diff --git a/Dist/8.0.0/uSync.ContentEdition_8.0.0.zip b/Dist/8.0.0/uSync.ContentEdition_8.0.0.zip deleted file mode 100644 index 7b522f8a..00000000 Binary files a/Dist/8.0.0/uSync.ContentEdition_8.0.0.zip and /dev/null differ diff --git a/Dist/8.0.0/uSync_8.0.0.zip b/Dist/8.0.0/uSync_8.0.0.zip deleted file mode 100644 index c0829c18..00000000 Binary files a/Dist/8.0.0/uSync_8.0.0.zip and /dev/null differ diff --git a/Dist/8.0.1/uSync.ContentEdition_8.0.1.zip b/Dist/8.0.1/uSync.ContentEdition_8.0.1.zip deleted file mode 100644 index 44ed3ea4..00000000 Binary files a/Dist/8.0.1/uSync.ContentEdition_8.0.1.zip and /dev/null differ diff --git a/Dist/8.0.1/uSync_8.0.1.zip b/Dist/8.0.1/uSync_8.0.1.zip deleted file mode 100644 index 5903b057..00000000 Binary files a/Dist/8.0.1/uSync_8.0.1.zip and /dev/null differ diff --git a/Dist/8.1.0/uSync.ContentEdition_8.1.0.zip b/Dist/8.1.0/uSync.ContentEdition_8.1.0.zip deleted file mode 100644 index b7b1fd0e..00000000 Binary files a/Dist/8.1.0/uSync.ContentEdition_8.1.0.zip and /dev/null differ diff --git a/Dist/8.1.0/uSync_8.1.0.zip b/Dist/8.1.0/uSync_8.1.0.zip deleted file mode 100644 index 6b7c1d2c..00000000 Binary files a/Dist/8.1.0/uSync_8.1.0.zip and /dev/null differ diff --git a/Dist/8.1.1/uSync.ContentEdition_8.1.1.zip b/Dist/8.1.1/uSync.ContentEdition_8.1.1.zip deleted file mode 100644 index 7391a686..00000000 Binary files a/Dist/8.1.1/uSync.ContentEdition_8.1.1.zip and /dev/null differ diff --git a/Dist/8.1.1/uSync_8.1.1.zip b/Dist/8.1.1/uSync_8.1.1.zip deleted file mode 100644 index d4ba0dae..00000000 Binary files a/Dist/8.1.1/uSync_8.1.1.zip and /dev/null differ diff --git a/Dist/8.2.0/uSync.ContentEdition_8.2.0.zip b/Dist/8.2.0/uSync.ContentEdition_8.2.0.zip deleted file mode 100644 index 65767db6..00000000 Binary files a/Dist/8.2.0/uSync.ContentEdition_8.2.0.zip and /dev/null differ diff --git a/Dist/8.2.0/uSync_8.2.0.zip b/Dist/8.2.0/uSync_8.2.0.zip deleted file mode 100644 index 53af0b89..00000000 Binary files a/Dist/8.2.0/uSync_8.2.0.zip and /dev/null differ diff --git a/Dist/8.2.1/uSync.ContentEdition_8.2.1.zip b/Dist/8.2.1/uSync.ContentEdition_8.2.1.zip deleted file mode 100644 index 3ad2d08f..00000000 Binary files a/Dist/8.2.1/uSync.ContentEdition_8.2.1.zip and /dev/null differ diff --git a/Dist/8.2.1/uSync_8.2.1.zip b/Dist/8.2.1/uSync_8.2.1.zip deleted file mode 100644 index f2fe30ed..00000000 Binary files a/Dist/8.2.1/uSync_8.2.1.zip and /dev/null differ diff --git a/Dist/8.2.2/uSync.ContentEdition_8.2.2.zip b/Dist/8.2.2/uSync.ContentEdition_8.2.2.zip deleted file mode 100644 index f20c5860..00000000 Binary files a/Dist/8.2.2/uSync.ContentEdition_8.2.2.zip and /dev/null differ diff --git a/Dist/8.2.2/uSync_8.2.2.zip b/Dist/8.2.2/uSync_8.2.2.zip deleted file mode 100644 index 4de6a91a..00000000 Binary files a/Dist/8.2.2/uSync_8.2.2.zip and /dev/null differ diff --git a/Dist/8.2.3/uSync.ContentEdition_8.2.3.zip b/Dist/8.2.3/uSync.ContentEdition_8.2.3.zip deleted file mode 100644 index ffe5e46b..00000000 Binary files a/Dist/8.2.3/uSync.ContentEdition_8.2.3.zip and /dev/null differ diff --git a/Dist/8.2.3/uSync_8.2.3.zip b/Dist/8.2.3/uSync_8.2.3.zip deleted file mode 100644 index b5ff78cb..00000000 Binary files a/Dist/8.2.3/uSync_8.2.3.zip and /dev/null differ diff --git a/Dist/8.2.4/uSync.ContentEdition_8.2.4.zip b/Dist/8.2.4/uSync.ContentEdition_8.2.4.zip deleted file mode 100644 index 06ba786c..00000000 Binary files a/Dist/8.2.4/uSync.ContentEdition_8.2.4.zip and /dev/null differ diff --git a/Dist/8.2.4/uSync_8.2.4.zip b/Dist/8.2.4/uSync_8.2.4.zip deleted file mode 100644 index 001897c9..00000000 Binary files a/Dist/8.2.4/uSync_8.2.4.zip and /dev/null differ diff --git a/Dist/8.3.0/uSync_8.3.0.zip b/Dist/8.3.0/uSync_8.3.0.zip deleted file mode 100644 index 14587056..00000000 Binary files a/Dist/8.3.0/uSync_8.3.0.zip and /dev/null differ diff --git a/Dist/8.3.1/uSync.ContentEdition_8.3.1.zip b/Dist/8.3.1/uSync.ContentEdition_8.3.1.zip deleted file mode 100644 index 132760b9..00000000 Binary files a/Dist/8.3.1/uSync.ContentEdition_8.3.1.zip and /dev/null differ diff --git a/Dist/8.3.1/uSync_8.3.1.zip b/Dist/8.3.1/uSync_8.3.1.zip deleted file mode 100644 index 916098fa..00000000 Binary files a/Dist/8.3.1/uSync_8.3.1.zip and /dev/null differ diff --git a/Dist/UmbPackage.exe b/Dist/UmbPackage.exe deleted file mode 100644 index 301e29e2..00000000 Binary files a/Dist/UmbPackage.exe and /dev/null differ diff --git a/Dist/betaBuild.cmd b/Dist/betaBuild.cmd deleted file mode 100644 index 8d418a5e..00000000 --- a/Dist/betaBuild.cmd +++ /dev/null @@ -1,11 +0,0 @@ -@ECHO OFF - -nuget pack ..\uSync8.Core\uSync.Core.nuspec -build -OutputDirectory beta\%1 -version %1 -Properties depends=%1;Configuration=Release -nuget pack ..\uSync8.BackOffice\uSync.nuspec -build -OutputDirectory beta\%1 -version %1 -Properties depends=%1;Configuration=Release -nuget pack ..\uSync8.BackOffice\uSync.BackOffice.Core.nuspec -build -OutputDirectory beta\%1 -version %1 -Properties depends=%1;Configuration=Release -nuget pack ..\uSync8.Community.Contrib\uSync.Community.Contrib.nuspec -OutputDirectory beta\%1 -build -version %1 -properties "depends=%1;Configuration=release" -nuget pack ..\uSync8.ContentEdition\uSync.ContentEdition.nuspec -OutputDirectory beta\%1 -build -version %1 -Properties depends=%1;Configuration=Release -nuget pack ..\uSync8.ContentEdition\uSync.ContentEdition.Core.nuspec -OutputDirectory beta\%1 -build -version %1 -Properties depends=%1;Configuration=Release - -XCOPY beta\%1\*.nupkg c:\source\localgit\uSyncBuilds\ /y - diff --git a/Dist/createpackages.cmd b/Dist/createpackages.cmd deleted file mode 100644 index 6d97e0d7..00000000 --- a/Dist/createpackages.cmd +++ /dev/null @@ -1,9 +0,0 @@ -@ECHO OFF - -CALL UmbPackage package.xml %1 -CALL "c:\Program Files\7-Zip\7z.exe" a .\%1\uSync_%1.zip .\%1\uSync_%1\*.* -CALL RD .\%1\uSync_%1\ /s /q - -CALL UmbPackage package.ContentEdition.xml %1 -CALL "c:\Program Files\7-Zip\7z.exe" a .\%1\uSync.ContentEdition_%1.zip .\%1\uSync.ContentEdition_%1\*.* -CALL RD .\%1\uSync.ContentEdition_%1\ /s /q diff --git a/Dist/package.ContentEdition.xml b/Dist/package.ContentEdition.xml deleted file mode 100644 index 05f230c3..00000000 --- a/Dist/package.ContentEdition.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - uSync.ContentEdition - 0.0.0 - Mozilla Public License 2.0 - http://jumoo.uk/uSync - http://jumoo.co.uk/img/usyncicon.png - - 8 - 0 - 0 - - - - Kevin Jump - http://jumoo.uk - - - - Adds Content/Media/Dictionary Items/and Domains to uSync Process -

]]> -
-
- - - - - - - - - - - - - - - - - - -
diff --git a/Dist/package.cmd b/Dist/package.cmd deleted file mode 100644 index b21f8ee4..00000000 --- a/Dist/package.cmd +++ /dev/null @@ -1,22 +0,0 @@ -@echo off - -SET config=release -REM SET config=debug - -@Echo Packaging for %config% -nuget pack ..\uSync8.Core\uSync.Core.nuspec -build -OutputDirectory %1 -version %1 -properties "depends=%1;Configuration=%config%" -nuget pack ..\uSync8.BackOffice\uSync.nuspec -build -OutputDirectory %1 -version %1 -properties "depends=%1;Configuration=%config%" -nuget pack ..\uSync8.BackOffice\uSync.BackOffice.Core.nuspec -build -OutputDirectory %1 -version %1 -properties "depends=%1;Configuration=%config%" -nuget pack ..\uSync8.Community.Contrib\uSync.Community.Contrib.nuspec -OutputDirectory %1 -build -version %1 -properties "depends=%1;Configuration=%config%" -nuget pack ..\uSync8.ContentEdition\uSync.ContentEdition.nuspec -OutputDirectory %1 -build -version %1 -properties "depends=%1;Configuration=%config%" -nuget pack ..\uSync8.ContentEdition\uSync.ContentEdition.Core.nuspec -OutputDirectory %1 -build -version %1 -properties "depends=%1;Configuration=%config%" - -nuget pack ..\uSync8.Community.DataTypeSerializers\uSync.Community.DataTypeSerializers.nuspec -OutputDirectory %1 -build -version %1 -properties "depends=%1;Configuration=%config%" - -nuget pack ..\uSync.Console\uSync.Console.nuspec -OutputDirectory %1 -build -version %1 -properties "depends=%1;Configuration=%config%" - -call CreatePackages %1 - -XCOPY %1\*.nupkg c:\source\localgit /y - -ECHO Packaging Complete (%config% build) \ No newline at end of file diff --git a/Dist/package.xml b/Dist/package.xml deleted file mode 100644 index 531cddb7..00000000 --- a/Dist/package.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - uSync - 0.0.0 - Mozilla Public License 2.0 - http://jumoo.uk/uSync - http://jumoo.co.uk/img/usyncicon.png - - 8 - 0 - 0 - - - - Kevin Jump - http://jumoo.uk - - - - Push and pull all the database config and elements of your umbraco solution to and from the disk. -

-

- Helps with Source Control, Continious Deployment and Multi Team Development. -

]]> -
-
- - - - - - - - - - - - - - - - - - - - - -
diff --git a/Dist/pre-release.md b/Dist/pre-release.md deleted file mode 100644 index e44b14bc..00000000 --- a/Dist/pre-release.md +++ /dev/null @@ -1,66 +0,0 @@ -# uSync checklist - -This is in addtion to any automated testing/etc (although it would be nice to automate this to). checklist of pre-release tests - to make sure things work as we expect them to in the 'real' world. - -## Basic setup - -### New Site -- [ ] Clean install doesn't break anything -- [ ] Installed before Umbraco is setup doesn't break anything -- [ ] Export works -- [ ] Report doesn't detect any changes -- [ ] Import doesn't detect any changes -- [ ] Full Import imports everything -- [ ] Restart Site - - [ ] Report after restart doesn't detect any changes - - [ ] Import after restart doesn't detect any changes - -### Upgrade -- [ ] Upgrading site from previous doesn't break site -- [ ] All files are updated -- [ ] javascript/css cache is broken if needed -- [ ] Report has no changes (point release) -- [ ] Import doesn't import anything -- [ ] Full Import still works -- [ ] Export works. - -### Site clone -- [ ] New empty site with uSync installed (no starter kit) -- [ ] Copy of folders (App_Plugins/css/scripts/views/media/uSync) - - [ ] Import imports everything (except for contact - missing dll) - - [ ] report only reports items dependeny on maps. - - [ ] Copy the map dll from bin - - [ ] Import imports the missing item - - [ ] Report details no changes between sites - -### Deletion -- [ ] Removal of Datatype -- [ ] Removal of DocType -- [ ] Removal of Content -- [ ] Removal of Media - -### Creation -- [ ] New Datatype copied as expected -- [ ] New Doctype copied as expected -- [ ] New Content Item copied as expected -- [ ] New Media item copied as expected - -### Updates -- [ ] update to Datatype copied as expected -- [ ] update to Doctype copied as expected -- [ ] update to Content Item copied as expected -- [ ] update to Media item copied as expected - -### Cultures (create welsh homepage on source) -- [ ] Language is created on target -- [ ] Content for language is created on target -- [ ] Content is published as expected - -### Scheduling -- [ ] Scheduled content is copied over to the new site -- [ ] Scheduled release in the past results in published item -- [ ] Scheduled expire in the past results in unpublished item -- [ ] Scheule of one language works as expected - -### uSync.Complete (Backwards compatability) -- [ ] Confirm that the current uSync.Complete checklist works with this version \ No newline at end of file diff --git a/Dist/single.cmd b/Dist/single.cmd deleted file mode 100644 index 2b0d782d..00000000 --- a/Dist/single.cmd +++ /dev/null @@ -1,10 +0,0 @@ -@REM build a single -@REM single [project] [nuspec] [version] [depends] -@REM single uSync8.Community.Contrib uSync.Community.Contrib 8.5.0.1 8.5.1 - -@echo off - -@Echo Packaging -nuget pack ..\%1\%2.nuspec -build -OutputDirectory %3 -version %3 -properties "depends=%4;Configuration=release" - -XCOPY %3\*.nupkg c:\source\localgit /y \ No newline at end of file diff --git a/NuGet.Config b/NuGet.Config deleted file mode 100644 index 01b22037..00000000 --- a/NuGet.Config +++ /dev/null @@ -1,13 +0,0 @@ - - - - - \ No newline at end of file diff --git a/README.md b/README.md index 58dc5587..f878f164 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ -# uSync8 -Database syncing tool for Umbraco 8. +# uSync +Database syncing tool for Umbraco .netcore version. + +!!! **This version is the .netcore dev version, very much an alpha in progress** ![uSync](https://github.com/KevinJump/uSync8/blob/v8/8.2/Screenshots/usyncprogress.gif "uSync Import Animation") diff --git a/Screenshots/ContentEdition.jpg b/Screenshots/ContentEdition.jpg deleted file mode 100644 index ac3fee70..00000000 Binary files a/Screenshots/ContentEdition.jpg and /dev/null differ diff --git a/Screenshots/ImportAnimation.gif b/Screenshots/ImportAnimation.gif deleted file mode 100644 index e9bc7c1e..00000000 Binary files a/Screenshots/ImportAnimation.gif and /dev/null differ diff --git a/Screenshots/PackageScreen.jpg b/Screenshots/PackageScreen.jpg deleted file mode 100644 index 39a95366..00000000 Binary files a/Screenshots/PackageScreen.jpg and /dev/null differ diff --git a/Screenshots/ReportDetail.jpg b/Screenshots/ReportDetail.jpg deleted file mode 100644 index 38c208a1..00000000 Binary files a/Screenshots/ReportDetail.jpg and /dev/null differ diff --git a/Screenshots/Reporting.jpg b/Screenshots/Reporting.jpg deleted file mode 100644 index b19df081..00000000 Binary files a/Screenshots/Reporting.jpg and /dev/null differ diff --git a/Screenshots/Settings.jpg b/Screenshots/Settings.jpg deleted file mode 100644 index 9fa16044..00000000 Binary files a/Screenshots/Settings.jpg and /dev/null differ diff --git a/Screenshots/usyncprogress.gif b/Screenshots/usyncprogress.gif deleted file mode 100644 index 12e4bacf..00000000 Binary files a/Screenshots/usyncprogress.gif and /dev/null differ diff --git a/gulpfile.js b/gulpfile.js deleted file mode 100644 index 1fd59b46..00000000 --- a/gulpfile.js +++ /dev/null @@ -1,32 +0,0 @@ -/// -const { watch, src, dest } = require('gulp'); - -const sourceFolder = 'uSync8.BackOffice/App_Plugins/uSync8/'; - -const source = sourceFolder + '**/*'; -const destination = 'uSync8.Site/App_Plugins/uSync8'; - - -function copy(path) { - - return src(path, { base: sourceFolder }) - .pipe(dest(destination)); -} - -function time() { - return '[' + new Date().toISOString().slice(11, -5) + ']'; -} - -exports.default = function () { - watch(source, { ignoreInitial: false }) - .on('change', function (path, stats) { - console.log(time(), path, 'changed'); - copy(path); - }) - .on('add', function (path, stats) { - console.log(time(), path, 'added'); - copy(path); - }); -}; - - diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index 3cc557ec..00000000 --- a/package-lock.json +++ /dev/null @@ -1,3430 +0,0 @@ -{ - "name": "usync8", - "version": "1.0.0", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "ansi-colors": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz", - "integrity": "sha512-SFKX67auSNoVR38N3L+nvsPjOE0bybKTYbkf5tRvushrAPQ9V75huw0ZxBkKVeRU9kqH3d6HA4xTckbwZ4ixmA==", - "dev": true, - "requires": { - "ansi-wrap": "^0.1.0" - } - }, - "ansi-gray": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/ansi-gray/-/ansi-gray-0.1.1.tgz", - "integrity": "sha1-KWLPVOyXksSFEKPetSRDaGHvclE=", - "dev": true, - "requires": { - "ansi-wrap": "0.1.0" - } - }, - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - }, - "ansi-wrap": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/ansi-wrap/-/ansi-wrap-0.1.0.tgz", - "integrity": "sha1-qCJQ3bABXponyoLoLqYDu/pF768=", - "dev": true - }, - "anymatch": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", - "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", - "dev": true, - "requires": { - "micromatch": "^3.1.4", - "normalize-path": "^2.1.1" - } - }, - "append-buffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/append-buffer/-/append-buffer-1.0.2.tgz", - "integrity": "sha1-2CIM9GYIFSXv6lBhTz3mUU36WPE=", - "dev": true, - "requires": { - "buffer-equal": "^1.0.0" - } - }, - "archy": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", - "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=", - "dev": true - }, - "arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", - "dev": true - }, - "arr-filter": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/arr-filter/-/arr-filter-1.1.2.tgz", - "integrity": "sha1-Q/3d0JHo7xGqTEXZzcGOLf8XEe4=", - "dev": true, - "requires": { - "make-iterator": "^1.0.0" - } - }, - "arr-flatten": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", - "dev": true - }, - "arr-map": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/arr-map/-/arr-map-2.0.2.tgz", - "integrity": "sha1-Onc0X/wc814qkYJWAfnljy4kysQ=", - "dev": true, - "requires": { - "make-iterator": "^1.0.0" - } - }, - "arr-union": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", - "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", - "dev": true - }, - "array-each": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz", - "integrity": "sha1-p5SvDAWrF1KEbudTofIRoFugxE8=", - "dev": true - }, - "array-initial": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/array-initial/-/array-initial-1.1.0.tgz", - "integrity": "sha1-L6dLJnOTccOUe9enrcc74zSz15U=", - "dev": true, - "requires": { - "array-slice": "^1.0.0", - "is-number": "^4.0.0" - }, - "dependencies": { - "is-number": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", - "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", - "dev": true - } - } - }, - "array-last": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/array-last/-/array-last-1.3.0.tgz", - "integrity": "sha512-eOCut5rXlI6aCOS7Z7kCplKRKyiFQ6dHFBem4PwlwKeNFk2/XxTrhRh5T9PyaEWGy/NHTZWbY+nsZlNFJu9rYg==", - "dev": true, - "requires": { - "is-number": "^4.0.0" - }, - "dependencies": { - "is-number": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", - "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", - "dev": true - } - } - }, - "array-slice": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz", - "integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==", - "dev": true - }, - "array-sort": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-sort/-/array-sort-1.0.0.tgz", - "integrity": "sha512-ihLeJkonmdiAsD7vpgN3CRcx2J2S0TiYW+IS/5zHBI7mKUq3ySvBdzzBfD236ubDBQFiiyG3SWCPc+msQ9KoYg==", - "dev": true, - "requires": { - "default-compare": "^1.0.0", - "get-value": "^2.0.6", - "kind-of": "^5.0.2" - }, - "dependencies": { - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - } - } - }, - "array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", - "dev": true - }, - "assign-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", - "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", - "dev": true - }, - "async-done": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/async-done/-/async-done-1.3.2.tgz", - "integrity": "sha512-uYkTP8dw2og1tu1nmza1n1CMW0qb8gWWlwqMmLb7MhBVs4BXrFziT6HXUd+/RlRA/i4H9AkofYloUbs1fwMqlw==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.2", - "process-nextick-args": "^2.0.0", - "stream-exhaust": "^1.0.1" - } - }, - "async-each": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz", - "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==", - "dev": true - }, - "async-settle": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/async-settle/-/async-settle-1.0.0.tgz", - "integrity": "sha1-HQqRS7Aldb7IqPOnTlCA9yssDGs=", - "dev": true, - "requires": { - "async-done": "^1.2.2" - } - }, - "atob": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", - "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", - "dev": true - }, - "bach": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/bach/-/bach-1.2.0.tgz", - "integrity": "sha1-Szzpa/JxNPeaG0FKUcFONMO9mIA=", - "dev": true, - "requires": { - "arr-filter": "^1.1.1", - "arr-flatten": "^1.0.1", - "arr-map": "^2.0.0", - "array-each": "^1.0.0", - "array-initial": "^1.0.0", - "array-last": "^1.1.1", - "async-done": "^1.2.2", - "async-settle": "^1.0.0", - "now-and-later": "^2.0.0" - } - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true - }, - "base": { - "version": "0.11.2", - "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", - "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", - "dev": true, - "requires": { - "cache-base": "^1.0.1", - "class-utils": "^0.3.5", - "component-emitter": "^1.2.1", - "define-property": "^1.0.0", - "isobject": "^3.0.1", - "mixin-deep": "^1.2.0", - "pascalcase": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "binary-extensions": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", - "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", - "dev": true - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", - "dev": true, - "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "buffer-equal": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-1.0.0.tgz", - "integrity": "sha1-WWFrSYME1Var1GaWayLu2j7KX74=", - "dev": true - }, - "buffer-from": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", - "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", - "dev": true - }, - "cache-base": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", - "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", - "dev": true, - "requires": { - "collection-visit": "^1.0.0", - "component-emitter": "^1.2.1", - "get-value": "^2.0.6", - "has-value": "^1.0.0", - "isobject": "^3.0.1", - "set-value": "^2.0.0", - "to-object-path": "^0.3.0", - "union-value": "^1.0.0", - "unset-value": "^1.0.0" - } - }, - "camelcase": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", - "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", - "dev": true - }, - "chokidar": { - "version": "2.1.8", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", - "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==", - "dev": true, - "requires": { - "anymatch": "^2.0.0", - "async-each": "^1.0.1", - "braces": "^2.3.2", - "fsevents": "^1.2.7", - "glob-parent": "^3.1.0", - "inherits": "^2.0.3", - "is-binary-path": "^1.0.0", - "is-glob": "^4.0.0", - "normalize-path": "^3.0.0", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.2.1", - "upath": "^1.1.1" - }, - "dependencies": { - "normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true - } - } - }, - "class-utils": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", - "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", - "dev": true, - "requires": { - "arr-union": "^3.1.0", - "define-property": "^0.2.5", - "isobject": "^3.0.0", - "static-extend": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, - "cliui": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", - "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", - "dev": true, - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wrap-ansi": "^2.0.0" - } - }, - "clone": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", - "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", - "dev": true - }, - "clone-buffer": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/clone-buffer/-/clone-buffer-1.0.0.tgz", - "integrity": "sha1-4+JbIHrE5wGvch4staFnksrD3Fg=", - "dev": true - }, - "clone-stats": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz", - "integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=", - "dev": true - }, - "cloneable-readable": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/cloneable-readable/-/cloneable-readable-1.1.3.tgz", - "integrity": "sha512-2EF8zTQOxYq70Y4XKtorQupqF0m49MBz2/yf5Bj+MHjvpG3Hy7sImifnqD6UA+TKYxeSV+u6qqQPawN5UvnpKQ==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "process-nextick-args": "^2.0.0", - "readable-stream": "^2.3.5" - } - }, - "code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", - "dev": true - }, - "collection-map": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/collection-map/-/collection-map-1.0.0.tgz", - "integrity": "sha1-rqDwb40mx4DCt1SUOFVEsiVa8Yw=", - "dev": true, - "requires": { - "arr-map": "^2.0.2", - "for-own": "^1.0.0", - "make-iterator": "^1.0.0" - } - }, - "collection-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", - "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", - "dev": true, - "requires": { - "map-visit": "^1.0.0", - "object-visit": "^1.0.0" - } - }, - "color-support": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", - "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", - "dev": true - }, - "component-emitter": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", - "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true - }, - "concat-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", - "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" - } - }, - "convert-source-map": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.6.0.tgz", - "integrity": "sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.1" - } - }, - "copy-descriptor": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", - "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", - "dev": true - }, - "copy-props": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/copy-props/-/copy-props-2.0.4.tgz", - "integrity": "sha512-7cjuUME+p+S3HZlbllgsn2CDwS+5eCCX16qBgNC4jgSTf49qR1VKy/Zhl400m0IQXl/bPGEVqncgUUMjrr4s8A==", - "dev": true, - "requires": { - "each-props": "^1.3.0", - "is-plain-object": "^2.0.1" - } - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", - "dev": true - }, - "d": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", - "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", - "dev": true, - "requires": { - "es5-ext": "^0.10.50", - "type": "^1.0.1" - } - }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", - "dev": true - }, - "decode-uri-component": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", - "dev": true - }, - "default-compare": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/default-compare/-/default-compare-1.0.0.tgz", - "integrity": "sha512-QWfXlM0EkAbqOCbD/6HjdwT19j7WCkMyiRhWilc4H9/5h/RzTF9gv5LYh1+CmDV5d1rki6KAWLtQale0xt20eQ==", - "dev": true, - "requires": { - "kind-of": "^5.0.2" - }, - "dependencies": { - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - } - } - }, - "default-resolution": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/default-resolution/-/default-resolution-2.0.0.tgz", - "integrity": "sha1-vLgrqnKtebQmp2cy8aga1t8m1oQ=", - "dev": true - }, - "define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", - "dev": true, - "requires": { - "object-keys": "^1.0.12" - } - }, - "define-property": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", - "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", - "dev": true, - "requires": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" - }, - "dependencies": { - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "detect-file": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", - "integrity": "sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc=", - "dev": true - }, - "duplexify": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", - "integrity": "sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==", - "dev": true, - "requires": { - "end-of-stream": "^1.0.0", - "inherits": "^2.0.1", - "readable-stream": "^2.0.0", - "stream-shift": "^1.0.0" - } - }, - "each-props": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/each-props/-/each-props-1.3.2.tgz", - "integrity": "sha512-vV0Hem3zAGkJAyU7JSjixeU66rwdynTAa1vofCrSA5fEln+m67Az9CcnkVD776/fsN/UjIWmBDoNRS6t6G9RfA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.1", - "object.defaults": "^1.1.0" - } - }, - "end-of-stream": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", - "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", - "dev": true, - "requires": { - "once": "^1.4.0" - } - }, - "error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, - "requires": { - "is-arrayish": "^0.2.1" - } - }, - "es5-ext": { - "version": "0.10.50", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.50.tgz", - "integrity": "sha512-KMzZTPBkeQV/JcSQhI5/z6d9VWJ3EnQ194USTUwIYZ2ZbpN8+SGXQKt1h68EX44+qt+Fzr8DO17vnxrw7c3agw==", - "dev": true, - "requires": { - "es6-iterator": "~2.0.3", - "es6-symbol": "~3.1.1", - "next-tick": "^1.0.0" - } - }, - "es6-iterator": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", - "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", - "dev": true, - "requires": { - "d": "1", - "es5-ext": "^0.10.35", - "es6-symbol": "^3.1.1" - } - }, - "es6-symbol": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz", - "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", - "dev": true, - "requires": { - "d": "1", - "es5-ext": "~0.10.14" - } - }, - "es6-weak-map": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz", - "integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==", - "dev": true, - "requires": { - "d": "1", - "es5-ext": "^0.10.46", - "es6-iterator": "^2.0.3", - "es6-symbol": "^3.1.1" - } - }, - "expand-brackets": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", - "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", - "dev": true, - "requires": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "expand-tilde": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", - "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=", - "dev": true, - "requires": { - "homedir-polyfill": "^1.0.1" - } - }, - "extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "dev": true - }, - "extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "dev": true, - "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "extglob": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", - "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", - "dev": true, - "requires": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "fancy-log": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.3.tgz", - "integrity": "sha512-k9oEhlyc0FrVh25qYuSELjr8oxsCoc4/LEZfg2iJJrfEk/tZL9bCoJE47gqAvI2m/AUjluCS4+3I0eTx8n3AEw==", - "dev": true, - "requires": { - "ansi-gray": "^0.1.1", - "color-support": "^1.1.3", - "parse-node-version": "^1.0.0", - "time-stamp": "^1.0.0" - } - }, - "fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", - "dev": true, - "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "findup-sync": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-3.0.0.tgz", - "integrity": "sha512-YbffarhcicEhOrm4CtrwdKBdCuz576RLdhJDsIfvNtxUuhdRet1qZcsMjqbePtAseKdAnDyM/IyXbu7PRPRLYg==", - "dev": true, - "requires": { - "detect-file": "^1.0.0", - "is-glob": "^4.0.0", - "micromatch": "^3.0.4", - "resolve-dir": "^1.0.1" - } - }, - "fined": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/fined/-/fined-1.2.0.tgz", - "integrity": "sha512-ZYDqPLGxDkDhDZBjZBb+oD1+j0rA4E0pXY50eplAAOPg2N/gUBSSk5IM1/QhPfyVo19lJ+CvXpqfvk+b2p/8Ng==", - "dev": true, - "requires": { - "expand-tilde": "^2.0.2", - "is-plain-object": "^2.0.3", - "object.defaults": "^1.1.0", - "object.pick": "^1.2.0", - "parse-filepath": "^1.0.1" - } - }, - "flagged-respawn": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.1.tgz", - "integrity": "sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q==", - "dev": true - }, - "flush-write-stream": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz", - "integrity": "sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "readable-stream": "^2.3.6" - } - }, - "for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", - "dev": true - }, - "for-own": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", - "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", - "dev": true, - "requires": { - "for-in": "^1.0.1" - } - }, - "fragment-cache": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", - "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", - "dev": true, - "requires": { - "map-cache": "^0.2.2" - } - }, - "fs-mkdirp-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs-mkdirp-stream/-/fs-mkdirp-stream-1.0.0.tgz", - "integrity": "sha1-C3gV/DIBxqaeFNuYzgmMFpNSWes=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.11", - "through2": "^2.0.3" - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true - }, - "fsevents": { - "version": "1.2.12", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.12.tgz", - "integrity": "sha512-Ggd/Ktt7E7I8pxZRbGIs7vwqAPscSESMrCSkx2FtWeqmheJgCo2R74fTsZFCifr0VTPwqRpPv17+6b8Zp7th0Q==", - "dev": true, - "optional": true, - "requires": { - "node-pre-gyp": "*" - }, - "dependencies": { - "abbrev": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "ansi-regex": { - "version": "2.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "aproba": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - }, - "are-we-there-yet": { - "version": "1.1.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - } - }, - "balanced-match": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "brace-expansion": { - "version": "1.1.11", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "chownr": { - "version": "1.1.4", - "bundled": true, - "dev": true, - "optional": true - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "optional": true - }, - "concat-map": { - "version": "0.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "console-control-strings": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "optional": true - }, - "core-util-is": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "debug": { - "version": "3.2.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ms": "^2.1.1" - } - }, - "deep-extend": { - "version": "0.6.0", - "bundled": true, - "dev": true, - "optional": true - }, - "delegates": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "detect-libc": { - "version": "1.0.3", - "bundled": true, - "dev": true, - "optional": true - }, - "fs-minipass": { - "version": "1.2.7", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.6.0" - } - }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "gauge": { - "version": "2.7.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" - } - }, - "glob": { - "version": "7.1.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "has-unicode": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "iconv-lite": { - "version": "0.4.24", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "ignore-walk": { - "version": "3.0.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minimatch": "^3.0.4" - } - }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "bundled": true, - "dev": true, - "optional": true - }, - "ini": { - "version": "1.3.5", - "bundled": true, - "dev": true, - "optional": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "isarray": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "1.2.5", - "bundled": true, - "dev": true, - "optional": true - }, - "minipass": { - "version": "2.9.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "^5.1.2", - "yallist": "^3.0.0" - } - }, - "minizlib": { - "version": "1.3.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.9.0" - } - }, - "mkdirp": { - "version": "0.5.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minimist": "^1.2.5" - } - }, - "ms": { - "version": "2.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "needle": { - "version": "2.3.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "debug": "^3.2.6", - "iconv-lite": "^0.4.4", - "sax": "^1.2.4" - } - }, - "node-pre-gyp": { - "version": "0.14.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "detect-libc": "^1.0.2", - "mkdirp": "^0.5.1", - "needle": "^2.2.1", - "nopt": "^4.0.1", - "npm-packlist": "^1.1.6", - "npmlog": "^4.0.2", - "rc": "^1.2.7", - "rimraf": "^2.6.1", - "semver": "^5.3.0", - "tar": "^4.4.2" - } - }, - "nopt": { - "version": "4.0.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "abbrev": "1", - "osenv": "^0.1.4" - } - }, - "npm-bundled": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "npm-normalize-package-bin": "^1.0.1" - } - }, - "npm-normalize-package-bin": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "npm-packlist": { - "version": "1.4.8", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1", - "npm-normalize-package-bin": "^1.0.1" - } - }, - "npmlog": { - "version": "4.1.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "object-assign": { - "version": "4.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "once": { - "version": "1.4.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "wrappy": "1" - } - }, - "os-homedir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "os-tmpdir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "osenv": { - "version": "0.1.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "process-nextick-args": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "rc": { - "version": "1.2.8", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - } - }, - "readable-stream": { - "version": "2.3.7", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "rimraf": { - "version": "2.7.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "glob": "^7.1.3" - } - }, - "safe-buffer": { - "version": "5.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "safer-buffer": { - "version": "2.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "sax": { - "version": "1.2.4", - "bundled": true, - "dev": true, - "optional": true - }, - "semver": { - "version": "5.7.1", - "bundled": true, - "dev": true, - "optional": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "string-width": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "string_decoder": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "tar": { - "version": "4.4.13", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "chownr": "^1.1.1", - "fs-minipass": "^1.2.5", - "minipass": "^2.8.6", - "minizlib": "^1.2.1", - "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.2", - "yallist": "^3.0.3" - } - }, - "util-deprecate": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "wide-align": { - "version": "1.1.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "string-width": "^1.0.2 || 2" - } - }, - "wrappy": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "yallist": { - "version": "3.1.1", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "get-caller-file": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", - "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", - "dev": true - }, - "get-value": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", - "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", - "dev": true - }, - "glob": { - "version": "7.1.4", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", - "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "glob-parent": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", - "dev": true, - "requires": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" - }, - "dependencies": { - "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "dev": true, - "requires": { - "is-extglob": "^2.1.0" - } - } - } - }, - "glob-stream": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-6.1.0.tgz", - "integrity": "sha1-cEXJlBOz65SIjYOrRtC0BMx73eQ=", - "dev": true, - "requires": { - "extend": "^3.0.0", - "glob": "^7.1.1", - "glob-parent": "^3.1.0", - "is-negated-glob": "^1.0.0", - "ordered-read-streams": "^1.0.0", - "pumpify": "^1.3.5", - "readable-stream": "^2.1.5", - "remove-trailing-separator": "^1.0.1", - "to-absolute-glob": "^2.0.0", - "unique-stream": "^2.0.2" - } - }, - "glob-watcher": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/glob-watcher/-/glob-watcher-5.0.3.tgz", - "integrity": "sha512-8tWsULNEPHKQ2MR4zXuzSmqbdyV5PtwwCaWSGQ1WwHsJ07ilNeN1JB8ntxhckbnpSHaf9dXFUHzIWvm1I13dsg==", - "dev": true, - "requires": { - "anymatch": "^2.0.0", - "async-done": "^1.2.0", - "chokidar": "^2.0.0", - "is-negated-glob": "^1.0.0", - "just-debounce": "^1.0.0", - "object.defaults": "^1.1.0" - } - }, - "global-modules": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", - "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", - "dev": true, - "requires": { - "global-prefix": "^1.0.1", - "is-windows": "^1.0.1", - "resolve-dir": "^1.0.0" - } - }, - "global-prefix": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", - "integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=", - "dev": true, - "requires": { - "expand-tilde": "^2.0.2", - "homedir-polyfill": "^1.0.1", - "ini": "^1.3.4", - "is-windows": "^1.0.1", - "which": "^1.2.14" - } - }, - "glogg": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/glogg/-/glogg-1.0.2.tgz", - "integrity": "sha512-5mwUoSuBk44Y4EshyiqcH95ZntbDdTQqA3QYSrxmzj28Ai0vXBGMH1ApSANH14j2sIRtqCEyg6PfsuP7ElOEDA==", - "dev": true, - "requires": { - "sparkles": "^1.0.0" - } - }, - "graceful-fs": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.2.tgz", - "integrity": "sha512-IItsdsea19BoLC7ELy13q1iJFNmd7ofZH5+X/pJr90/nRoPEX0DJo1dHDbgtYWOhJhcCgMDTOw84RZ72q6lB+Q==", - "dev": true - }, - "gulp": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/gulp/-/gulp-4.0.2.tgz", - "integrity": "sha512-dvEs27SCZt2ibF29xYgmnwwCYZxdxhQ/+LFWlbAW8y7jt68L/65402Lz3+CKy0Ov4rOs+NERmDq7YlZaDqUIfA==", - "dev": true, - "requires": { - "glob-watcher": "^5.0.3", - "gulp-cli": "^2.2.0", - "undertaker": "^1.2.1", - "vinyl-fs": "^3.0.0" - }, - "dependencies": { - "gulp-cli": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/gulp-cli/-/gulp-cli-2.2.0.tgz", - "integrity": "sha512-rGs3bVYHdyJpLqR0TUBnlcZ1O5O++Zs4bA0ajm+zr3WFCfiSLjGwoCBqFs18wzN+ZxahT9DkOK5nDf26iDsWjA==", - "dev": true, - "requires": { - "ansi-colors": "^1.0.1", - "archy": "^1.0.0", - "array-sort": "^1.0.0", - "color-support": "^1.1.3", - "concat-stream": "^1.6.0", - "copy-props": "^2.0.1", - "fancy-log": "^1.3.2", - "gulplog": "^1.0.0", - "interpret": "^1.1.0", - "isobject": "^3.0.1", - "liftoff": "^3.1.0", - "matchdep": "^2.0.0", - "mute-stdout": "^1.0.0", - "pretty-hrtime": "^1.0.0", - "replace-homedir": "^1.0.0", - "semver-greatest-satisfied-range": "^1.1.0", - "v8flags": "^3.0.1", - "yargs": "^7.1.0" - } - } - } - }, - "gulplog": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz", - "integrity": "sha1-4oxNRdBey77YGDY86PnFkmIp/+U=", - "dev": true, - "requires": { - "glogg": "^1.0.0" - } - }, - "has-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", - "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=", - "dev": true - }, - "has-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", - "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", - "dev": true, - "requires": { - "get-value": "^2.0.6", - "has-values": "^1.0.0", - "isobject": "^3.0.0" - } - }, - "has-values": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", - "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", - "dev": true, - "requires": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" - }, - "dependencies": { - "kind-of": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", - "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "homedir-polyfill": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", - "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", - "dev": true, - "requires": { - "parse-passwd": "^1.0.0" - } - }, - "hosted-git-info": { - "version": "2.8.4", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.4.tgz", - "integrity": "sha512-pzXIvANXEFrc5oFFXRMkbLPQ2rXRoDERwDLyrcUxGhaZhgP54BBSl9Oheh7Vv0T090cszWBxPjkQQ5Sq1PbBRQ==", - "dev": true - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, - "ini": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", - "dev": true - }, - "interpret": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.2.0.tgz", - "integrity": "sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==", - "dev": true - }, - "invert-kv": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", - "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", - "dev": true - }, - "is-absolute": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", - "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==", - "dev": true, - "requires": { - "is-relative": "^1.0.0", - "is-windows": "^1.0.1" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", - "dev": true - }, - "is-binary-path": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", - "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", - "dev": true, - "requires": { - "binary-extensions": "^1.0.0" - } - }, - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "dependencies": { - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - } - } - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "dev": true - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-negated-glob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-negated-glob/-/is-negated-glob-1.0.0.tgz", - "integrity": "sha1-aRC8pdqMleeEtXUbl2z1oQ/uNtI=", - "dev": true - }, - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, - "is-relative": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz", - "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==", - "dev": true, - "requires": { - "is-unc-path": "^1.0.0" - } - }, - "is-unc-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz", - "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==", - "dev": true, - "requires": { - "unc-path-regex": "^0.1.2" - } - }, - "is-utf8": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", - "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", - "dev": true - }, - "is-valid-glob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-valid-glob/-/is-valid-glob-1.0.0.tgz", - "integrity": "sha1-Kb8+/3Ab4tTTFdusw5vDn+j2Aao=", - "dev": true - }, - "is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", - "dev": true - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - }, - "json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", - "dev": true - }, - "just-debounce": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/just-debounce/-/just-debounce-1.0.0.tgz", - "integrity": "sha1-h/zPrv/AtozRnVX2cilD+SnqNeo=", - "dev": true - }, - "kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true - }, - "last-run": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/last-run/-/last-run-1.1.1.tgz", - "integrity": "sha1-RblpQsF7HHnHchmCWbqUO+v4yls=", - "dev": true, - "requires": { - "default-resolution": "^2.0.0", - "es6-weak-map": "^2.0.1" - } - }, - "lazystream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.0.tgz", - "integrity": "sha1-9plf4PggOS9hOWvolGJAe7dxaOQ=", - "dev": true, - "requires": { - "readable-stream": "^2.0.5" - } - }, - "lcid": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", - "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", - "dev": true, - "requires": { - "invert-kv": "^1.0.0" - } - }, - "lead": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lead/-/lead-1.0.0.tgz", - "integrity": "sha1-bxT5mje+Op3XhPVJVpDlkDRm7kI=", - "dev": true, - "requires": { - "flush-write-stream": "^1.0.2" - } - }, - "liftoff": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/liftoff/-/liftoff-3.1.0.tgz", - "integrity": "sha512-DlIPlJUkCV0Ips2zf2pJP0unEoT1kwYhiiPUGF3s/jtxTCjziNLoiVVh+jqWOWeFi6mmwQ5fNxvAUyPad4Dfog==", - "dev": true, - "requires": { - "extend": "^3.0.0", - "findup-sync": "^3.0.0", - "fined": "^1.0.1", - "flagged-respawn": "^1.0.0", - "is-plain-object": "^2.0.4", - "object.map": "^1.0.0", - "rechoir": "^0.6.2", - "resolve": "^1.1.7" - } - }, - "load-json-file": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", - "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "strip-bom": "^2.0.0" - } - }, - "make-iterator": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz", - "integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==", - "dev": true, - "requires": { - "kind-of": "^6.0.2" - } - }, - "map-cache": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", - "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", - "dev": true - }, - "map-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", - "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", - "dev": true, - "requires": { - "object-visit": "^1.0.0" - } - }, - "matchdep": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/matchdep/-/matchdep-2.0.0.tgz", - "integrity": "sha1-xvNINKDY28OzfCfui7yyfHd1WC4=", - "dev": true, - "requires": { - "findup-sync": "^2.0.0", - "micromatch": "^3.0.4", - "resolve": "^1.4.0", - "stack-trace": "0.0.10" - }, - "dependencies": { - "findup-sync": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-2.0.0.tgz", - "integrity": "sha1-kyaxSIwi0aYIhlCoaQGy2akKLLw=", - "dev": true, - "requires": { - "detect-file": "^1.0.0", - "is-glob": "^3.1.0", - "micromatch": "^3.0.4", - "resolve-dir": "^1.0.1" - } - }, - "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "dev": true, - "requires": { - "is-extglob": "^2.1.0" - } - } - } - }, - "micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" - } - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "mixin-deep": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", - "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", - "dev": true, - "requires": { - "for-in": "^1.0.2", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - } - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, - "mute-stdout": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mute-stdout/-/mute-stdout-1.0.1.tgz", - "integrity": "sha512-kDcwXR4PS7caBpuRYYBUz9iVixUk3anO3f5OYFiIPwK/20vCzKCHyKoulbiDY1S53zD2bxUpxN/IJ+TnXjfvxg==", - "dev": true - }, - "nanomatch": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", - "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "fragment-cache": "^0.2.1", - "is-windows": "^1.0.2", - "kind-of": "^6.0.2", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - } - }, - "next-tick": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", - "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=", - "dev": true - }, - "normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", - "dev": true, - "requires": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", - "dev": true, - "requires": { - "remove-trailing-separator": "^1.0.1" - } - }, - "now-and-later": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/now-and-later/-/now-and-later-2.0.1.tgz", - "integrity": "sha512-KGvQ0cB70AQfg107Xvs/Fbu+dGmZoTRJp2TaPwcwQm3/7PteUyN2BCgk8KBMPGBUXZdVwyWS8fDCGFygBm19UQ==", - "dev": true, - "requires": { - "once": "^1.3.2" - } - }, - "number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", - "dev": true - }, - "object-copy": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", - "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", - "dev": true, - "requires": { - "copy-descriptor": "^0.1.0", - "define-property": "^0.2.5", - "kind-of": "^3.0.3" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true - }, - "object-visit": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", - "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", - "dev": true, - "requires": { - "isobject": "^3.0.0" - } - }, - "object.assign": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", - "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", - "dev": true, - "requires": { - "define-properties": "^1.1.2", - "function-bind": "^1.1.1", - "has-symbols": "^1.0.0", - "object-keys": "^1.0.11" - } - }, - "object.defaults": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz", - "integrity": "sha1-On+GgzS0B96gbaFtiNXNKeQ1/s8=", - "dev": true, - "requires": { - "array-each": "^1.0.1", - "array-slice": "^1.0.0", - "for-own": "^1.0.0", - "isobject": "^3.0.0" - } - }, - "object.map": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object.map/-/object.map-1.0.1.tgz", - "integrity": "sha1-z4Plncj8wK1fQlDh94s7gb2AHTc=", - "dev": true, - "requires": { - "for-own": "^1.0.0", - "make-iterator": "^1.0.0" - } - }, - "object.pick": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", - "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, - "object.reduce": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object.reduce/-/object.reduce-1.0.1.tgz", - "integrity": "sha1-b+NI8qx/oPlcpiEiZZkJaCW7A60=", - "dev": true, - "requires": { - "for-own": "^1.0.0", - "make-iterator": "^1.0.0" - } - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "ordered-read-streams": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-1.0.1.tgz", - "integrity": "sha1-d8DLN8QVJdZBZtmQ/61+xqDhNj4=", - "dev": true, - "requires": { - "readable-stream": "^2.0.1" - } - }, - "os-locale": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", - "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", - "dev": true, - "requires": { - "lcid": "^1.0.0" - } - }, - "parse-filepath": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.2.tgz", - "integrity": "sha1-pjISf1Oq89FYdvWHLz/6x2PWyJE=", - "dev": true, - "requires": { - "is-absolute": "^1.0.0", - "map-cache": "^0.2.0", - "path-root": "^0.1.1" - } - }, - "parse-json": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", - "dev": true, - "requires": { - "error-ex": "^1.2.0" - } - }, - "parse-node-version": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parse-node-version/-/parse-node-version-1.0.1.tgz", - "integrity": "sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==", - "dev": true - }, - "parse-passwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", - "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=", - "dev": true - }, - "pascalcase": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", - "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", - "dev": true - }, - "path-dirname": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", - "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", - "dev": true - }, - "path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", - "dev": true, - "requires": { - "pinkie-promise": "^2.0.0" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true - }, - "path-parse": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", - "dev": true - }, - "path-root": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz", - "integrity": "sha1-mkpoFMrBwM1zNgqV8yCDyOpHRbc=", - "dev": true, - "requires": { - "path-root-regex": "^0.1.0" - } - }, - "path-root-regex": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz", - "integrity": "sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0=", - "dev": true - }, - "path-type": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", - "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - }, - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", - "dev": true - }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", - "dev": true, - "requires": { - "pinkie": "^2.0.0" - } - }, - "posix-character-classes": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", - "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", - "dev": true - }, - "pretty-hrtime": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz", - "integrity": "sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=", - "dev": true - }, - "process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", - "dev": true - }, - "pump": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", - "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "pumpify": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz", - "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", - "dev": true, - "requires": { - "duplexify": "^3.6.0", - "inherits": "^2.0.3", - "pump": "^2.0.0" - } - }, - "read-pkg": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", - "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", - "dev": true, - "requires": { - "load-json-file": "^1.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^1.0.0" - } - }, - "read-pkg-up": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", - "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", - "dev": true, - "requires": { - "find-up": "^1.0.0", - "read-pkg": "^1.0.0" - } - }, - "readable-stream": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "readdirp": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", - "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.11", - "micromatch": "^3.1.10", - "readable-stream": "^2.0.2" - } - }, - "rechoir": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", - "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", - "dev": true, - "requires": { - "resolve": "^1.1.6" - } - }, - "regex-not": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", - "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", - "dev": true, - "requires": { - "extend-shallow": "^3.0.2", - "safe-regex": "^1.1.0" - } - }, - "remove-bom-buffer": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/remove-bom-buffer/-/remove-bom-buffer-3.0.0.tgz", - "integrity": "sha512-8v2rWhaakv18qcvNeli2mZ/TMTL2nEyAKRvzo1WtnZBl15SHyEhrCu2/xKlJyUFKHiHgfXIyuY6g2dObJJycXQ==", - "dev": true, - "requires": { - "is-buffer": "^1.1.5", - "is-utf8": "^0.2.1" - } - }, - "remove-bom-stream": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/remove-bom-stream/-/remove-bom-stream-1.2.0.tgz", - "integrity": "sha1-BfGlk/FuQuH7kOv1nejlaVJflSM=", - "dev": true, - "requires": { - "remove-bom-buffer": "^3.0.0", - "safe-buffer": "^5.1.0", - "through2": "^2.0.3" - } - }, - "remove-trailing-separator": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", - "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", - "dev": true - }, - "repeat-element": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", - "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", - "dev": true - }, - "repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", - "dev": true - }, - "replace-ext": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.0.tgz", - "integrity": "sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=", - "dev": true - }, - "replace-homedir": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/replace-homedir/-/replace-homedir-1.0.0.tgz", - "integrity": "sha1-6H9tUTuSjd6AgmDBK+f+xv9ueYw=", - "dev": true, - "requires": { - "homedir-polyfill": "^1.0.1", - "is-absolute": "^1.0.0", - "remove-trailing-separator": "^1.1.0" - } - }, - "require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "dev": true - }, - "require-main-filename": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", - "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", - "dev": true - }, - "resolve": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.12.0.tgz", - "integrity": "sha512-B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w==", - "dev": true, - "requires": { - "path-parse": "^1.0.6" - } - }, - "resolve-dir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", - "integrity": "sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=", - "dev": true, - "requires": { - "expand-tilde": "^2.0.0", - "global-modules": "^1.0.0" - } - }, - "resolve-options": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/resolve-options/-/resolve-options-1.1.0.tgz", - "integrity": "sha1-MrueOcBtZzONyTeMDW1gdFZq0TE=", - "dev": true, - "requires": { - "value-or-function": "^3.0.0" - } - }, - "resolve-url": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", - "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", - "dev": true - }, - "ret": { - "version": "0.1.15", - "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", - "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", - "dev": true - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "safe-regex": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", - "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", - "dev": true, - "requires": { - "ret": "~0.1.10" - } - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - }, - "semver-greatest-satisfied-range": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/semver-greatest-satisfied-range/-/semver-greatest-satisfied-range-1.1.0.tgz", - "integrity": "sha1-E+jCZYq5aRywzXEJMkAoDTb3els=", - "dev": true, - "requires": { - "sver-compat": "^1.5.0" - } - }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", - "dev": true - }, - "set-value": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", - "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.3", - "split-string": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "snapdragon": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", - "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", - "dev": true, - "requires": { - "base": "^0.11.1", - "debug": "^2.2.0", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "map-cache": "^0.2.2", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^3.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "snapdragon-node": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", - "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", - "dev": true, - "requires": { - "define-property": "^1.0.0", - "isobject": "^3.0.0", - "snapdragon-util": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - } - } - }, - "snapdragon-util": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", - "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", - "dev": true, - "requires": { - "kind-of": "^3.2.0" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - }, - "source-map-resolve": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", - "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", - "dev": true, - "requires": { - "atob": "^2.1.1", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" - } - }, - "source-map-url": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", - "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", - "dev": true - }, - "sparkles": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/sparkles/-/sparkles-1.0.1.tgz", - "integrity": "sha512-dSO0DDYUahUt/0/pD/Is3VIm5TGJjludZ0HVymmhYF6eNA53PVLhnUk0znSYbH8IYBuJdCE+1luR22jNLMaQdw==", - "dev": true - }, - "spdx-correct": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", - "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==", - "dev": true, - "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-exceptions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", - "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==", - "dev": true - }, - "spdx-expression-parse": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", - "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", - "dev": true, - "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-license-ids": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz", - "integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==", - "dev": true - }, - "split-string": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", - "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", - "dev": true, - "requires": { - "extend-shallow": "^3.0.0" - } - }, - "stack-trace": { - "version": "0.0.10", - "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", - "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=", - "dev": true - }, - "static-extend": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", - "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", - "dev": true, - "requires": { - "define-property": "^0.2.5", - "object-copy": "^0.1.0" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - } - } - }, - "stream-exhaust": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/stream-exhaust/-/stream-exhaust-1.0.2.tgz", - "integrity": "sha512-b/qaq/GlBK5xaq1yrK9/zFcyRSTNxmcZwFLGSTG0mXgZl/4Z6GgiyYOXOvY7N3eEvFRAG1bkDRz5EPGSvPYQlw==", - "dev": true - }, - "stream-shift": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz", - "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=", - "dev": true - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-bom": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", - "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", - "dev": true, - "requires": { - "is-utf8": "^0.2.0" - } - }, - "sver-compat": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/sver-compat/-/sver-compat-1.5.0.tgz", - "integrity": "sha1-PPh9/rTQe0o/FIJ7wYaz/QxkXNg=", - "dev": true, - "requires": { - "es6-iterator": "^2.0.1", - "es6-symbol": "^3.1.1" - } - }, - "through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "requires": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - }, - "through2-filter": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/through2-filter/-/through2-filter-3.0.0.tgz", - "integrity": "sha512-jaRjI2WxN3W1V8/FMZ9HKIBXixtiqs3SQSX4/YGIiP3gL6djW48VoZq9tDqeCWs3MT8YY5wb/zli8VW8snY1CA==", - "dev": true, - "requires": { - "through2": "~2.0.0", - "xtend": "~4.0.0" - } - }, - "time-stamp": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/time-stamp/-/time-stamp-1.1.0.tgz", - "integrity": "sha1-dkpaEa9QVhkhsTPztE5hhofg9cM=", - "dev": true - }, - "to-absolute-glob": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/to-absolute-glob/-/to-absolute-glob-2.0.2.tgz", - "integrity": "sha1-GGX0PZ50sIItufFFt4z/fQ98hJs=", - "dev": true, - "requires": { - "is-absolute": "^1.0.0", - "is-negated-glob": "^1.0.0" - } - }, - "to-object-path": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", - "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "to-regex": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", - "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", - "dev": true, - "requires": { - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "regex-not": "^1.0.2", - "safe-regex": "^1.1.0" - } - }, - "to-regex-range": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", - "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", - "dev": true, - "requires": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" - } - }, - "to-through": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-through/-/to-through-2.0.0.tgz", - "integrity": "sha1-/JKtq6ByZHvAtn1rA2ZKoZUJOvY=", - "dev": true, - "requires": { - "through2": "^2.0.3" - } - }, - "type": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/type/-/type-1.0.3.tgz", - "integrity": "sha512-51IMtNfVcee8+9GJvj0spSuFcZHe9vSib6Xtgsny1Km9ugyz2mbS08I3rsUIRYgJohFRFU1160sgRodYz378Hg==", - "dev": true - }, - "typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", - "dev": true - }, - "unc-path-regex": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", - "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=", - "dev": true - }, - "undertaker": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/undertaker/-/undertaker-1.2.1.tgz", - "integrity": "sha512-71WxIzDkgYk9ZS+spIB8iZXchFhAdEo2YU8xYqBYJ39DIUIqziK78ftm26eecoIY49X0J2MLhG4hr18Yp6/CMA==", - "dev": true, - "requires": { - "arr-flatten": "^1.0.1", - "arr-map": "^2.0.0", - "bach": "^1.0.0", - "collection-map": "^1.0.0", - "es6-weak-map": "^2.0.1", - "last-run": "^1.1.0", - "object.defaults": "^1.0.0", - "object.reduce": "^1.0.0", - "undertaker-registry": "^1.0.0" - } - }, - "undertaker-registry": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/undertaker-registry/-/undertaker-registry-1.0.1.tgz", - "integrity": "sha1-XkvaMI5KiirlhPm5pDWaSZglzFA=", - "dev": true - }, - "union-value": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", - "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", - "dev": true, - "requires": { - "arr-union": "^3.1.0", - "get-value": "^2.0.6", - "is-extendable": "^0.1.1", - "set-value": "^2.0.1" - } - }, - "unique-stream": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-2.3.1.tgz", - "integrity": "sha512-2nY4TnBE70yoxHkDli7DMazpWiP7xMdCYqU2nBRO0UB+ZpEkGsSija7MvmvnZFUeC+mrgiUfcHSr3LmRFIg4+A==", - "dev": true, - "requires": { - "json-stable-stringify-without-jsonify": "^1.0.1", - "through2-filter": "^3.0.0" - } - }, - "unset-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", - "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", - "dev": true, - "requires": { - "has-value": "^0.3.1", - "isobject": "^3.0.0" - }, - "dependencies": { - "has-value": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", - "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", - "dev": true, - "requires": { - "get-value": "^2.0.3", - "has-values": "^0.1.4", - "isobject": "^2.0.0" - }, - "dependencies": { - "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "dev": true, - "requires": { - "isarray": "1.0.0" - } - } - } - }, - "has-values": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", - "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", - "dev": true - } - } - }, - "upath": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/upath/-/upath-1.1.2.tgz", - "integrity": "sha512-kXpym8nmDmlCBr7nKdIx8P2jNBa+pBpIUFRnKJ4dr8htyYGJFokkr2ZvERRtUN+9SY+JqXouNgUPtv6JQva/2Q==", - "dev": true - }, - "urix": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", - "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", - "dev": true - }, - "use": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", - "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", - "dev": true - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true - }, - "v8flags": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.1.3.tgz", - "integrity": "sha512-amh9CCg3ZxkzQ48Mhcb8iX7xpAfYJgePHxWMQCBWECpOSqJUXgY26ncA61UTV0BkPqfhcy6mzwCIoP4ygxpW8w==", - "dev": true, - "requires": { - "homedir-polyfill": "^1.0.1" - } - }, - "validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", - "dev": true, - "requires": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, - "value-or-function": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/value-or-function/-/value-or-function-3.0.0.tgz", - "integrity": "sha1-HCQ6ULWVwb5Up1S/7OhWO5/42BM=", - "dev": true - }, - "vinyl": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.2.0.tgz", - "integrity": "sha512-MBH+yP0kC/GQ5GwBqrTPTzEfiiLjta7hTtvQtbxBgTeSXsmKQRQecjibMbxIXzVT3Y9KJK+drOz1/k+vsu8Nkg==", - "dev": true, - "requires": { - "clone": "^2.1.1", - "clone-buffer": "^1.0.0", - "clone-stats": "^1.0.0", - "cloneable-readable": "^1.0.0", - "remove-trailing-separator": "^1.0.1", - "replace-ext": "^1.0.0" - } - }, - "vinyl-fs": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-3.0.3.tgz", - "integrity": "sha512-vIu34EkyNyJxmP0jscNzWBSygh7VWhqun6RmqVfXePrOwi9lhvRs//dOaGOTRUQr4tx7/zd26Tk5WeSVZitgng==", - "dev": true, - "requires": { - "fs-mkdirp-stream": "^1.0.0", - "glob-stream": "^6.1.0", - "graceful-fs": "^4.0.0", - "is-valid-glob": "^1.0.0", - "lazystream": "^1.0.0", - "lead": "^1.0.0", - "object.assign": "^4.0.4", - "pumpify": "^1.3.5", - "readable-stream": "^2.3.3", - "remove-bom-buffer": "^3.0.0", - "remove-bom-stream": "^1.2.0", - "resolve-options": "^1.1.0", - "through2": "^2.0.0", - "to-through": "^2.0.0", - "value-or-function": "^3.0.0", - "vinyl": "^2.0.0", - "vinyl-sourcemap": "^1.1.0" - } - }, - "vinyl-sourcemap": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/vinyl-sourcemap/-/vinyl-sourcemap-1.1.0.tgz", - "integrity": "sha1-kqgAWTo4cDqM2xHYswCtS+Y7PhY=", - "dev": true, - "requires": { - "append-buffer": "^1.0.2", - "convert-source-map": "^1.5.0", - "graceful-fs": "^4.1.6", - "normalize-path": "^2.1.1", - "now-and-later": "^2.0.0", - "remove-bom-buffer": "^3.0.0", - "vinyl": "^2.0.0" - } - }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "which-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", - "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=", - "dev": true - }, - "wrap-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", - "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", - "dev": true, - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true - }, - "xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "dev": true - }, - "y18n": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", - "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", - "dev": true - }, - "yargs": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.0.tgz", - "integrity": "sha1-a6MY6xaWFyf10oT46gA+jWFU0Mg=", - "dev": true, - "requires": { - "camelcase": "^3.0.0", - "cliui": "^3.2.0", - "decamelize": "^1.1.1", - "get-caller-file": "^1.0.1", - "os-locale": "^1.4.0", - "read-pkg-up": "^1.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^1.0.2", - "which-module": "^1.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^5.0.0" - } - }, - "yargs-parser": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-5.0.0.tgz", - "integrity": "sha1-J17PDX/+Bcd+ZOfIbkzZS/DhIoo=", - "dev": true, - "requires": { - "camelcase": "^3.0.0" - } - } - } -} diff --git a/package.json b/package.json deleted file mode 100644 index a86a56f5..00000000 --- a/package.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "usync8", - "version": "1.0.0", - "description": "Database syncing tool for Umbraco 8", - "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/KevinJump/uSync8.git" - }, - "author": "", - "license": "ISC", - "bugs": { - "url": "https://github.com/KevinJump/uSync8/issues" - }, - "homepage": "https://github.com/KevinJump/uSync8#readme", - "devDependencies": { - "gulp": "^4.0.2" - } -} diff --git a/uSync8.BackOffice/App_Plugins/uSync8/addons.json b/uSync.BackOffice/App_Plugins/uSync8/addons.json similarity index 100% rename from uSync8.BackOffice/App_Plugins/uSync8/addons.json rename to uSync.BackOffice/App_Plugins/uSync8/addons.json diff --git a/uSync8.BackOffice/App_Plugins/uSync8/backoffice/uSync8/dashboard.html b/uSync.BackOffice/App_Plugins/uSync8/backoffice/uSync8/dashboard.html similarity index 82% rename from uSync8.BackOffice/App_Plugins/uSync8/backoffice/uSync8/dashboard.html rename to uSync.BackOffice/App_Plugins/uSync8/backoffice/uSync8/dashboard.html index 4244bf8e..bc108ce3 100644 --- a/uSync8.BackOffice/App_Plugins/uSync8/backoffice/uSync8/dashboard.html +++ b/uSync.BackOffice/App_Plugins/uSync8/backoffice/uSync8/dashboard.html @@ -1,13 +1,11 @@ 
- diff --git a/uSync8.BackOffice/App_Plugins/uSync8/backoffice/uSync8/uSyncDashboardController.js b/uSync.BackOffice/App_Plugins/uSync8/backoffice/uSync8/uSyncDashboardController.js similarity index 78% rename from uSync8.BackOffice/App_Plugins/uSync8/backoffice/uSync8/uSyncDashboardController.js rename to uSync.BackOffice/App_Plugins/uSync8/backoffice/uSync8/uSyncDashboardController.js index fd033e67..e085ec5b 100644 --- a/uSync8.BackOffice/App_Plugins/uSync8/backoffice/uSync8/uSyncDashboardController.js +++ b/uSync.BackOffice/App_Plugins/uSync8/backoffice/uSync8/uSyncDashboardController.js @@ -36,28 +36,21 @@ navigationService.syncTree({ tree: "uSync8", path: "-1" }); }); - uSync8DashboardService.getAddOns() .then(function (result) { - vm.page.description = 'v' + result.data.Version; - if (result.data.AddOnString.length > 0) { - vm.page.description += ' + ' + result.data.AddOnString; - } vm.addOns = result.data.AddOns; - vm.addOns.forEach(function (value, key) { if (value.View !== '') { - vm.page.navigation.splice(vm.page.navigation.length-2, 0, - { - 'name': value.DisplayName, - 'alias': value.Alias, - 'icon': value.Icon, - 'view': value.View - }); + vm.page.navigation.splice(vm.page.navigation.length - 2, 0, + { + 'name': value.DisplayName, + 'alias': value.Alias, + 'icon': value.Icon, + 'view': value.View + }); } }); }); - } angular.module('umbraco') diff --git a/uSync8.BackOffice/App_Plugins/uSync8/changeDialog.html b/uSync.BackOffice/App_Plugins/uSync8/changeDialog.html similarity index 100% rename from uSync8.BackOffice/App_Plugins/uSync8/changeDialog.html rename to uSync.BackOffice/App_Plugins/uSync8/changeDialog.html diff --git a/uSync8.BackOffice/App_Plugins/uSync8/changeDialogController.js b/uSync.BackOffice/App_Plugins/uSync8/changeDialogController.js similarity index 100% rename from uSync8.BackOffice/App_Plugins/uSync8/changeDialogController.js rename to uSync.BackOffice/App_Plugins/uSync8/changeDialogController.js diff --git a/uSync8.BackOffice/App_Plugins/uSync8/components/uSyncProgressView.html b/uSync.BackOffice/App_Plugins/uSync8/components/uSyncProgressView.html similarity index 100% rename from uSync8.BackOffice/App_Plugins/uSync8/components/uSyncProgressView.html rename to uSync.BackOffice/App_Plugins/uSync8/components/uSyncProgressView.html diff --git a/uSync8.BackOffice/App_Plugins/uSync8/components/uSyncReportView.html b/uSync.BackOffice/App_Plugins/uSync8/components/uSyncReportView.html similarity index 85% rename from uSync8.BackOffice/App_Plugins/uSync8/components/uSyncReportView.html rename to uSync.BackOffice/App_Plugins/uSync8/components/uSyncReportView.html index 79c1747e..a70d922a 100644 --- a/uSync8.BackOffice/App_Plugins/uSync8/components/uSyncReportView.html +++ b/uSync.BackOffice/App_Plugins/uSync8/components/uSyncReportView.html @@ -11,7 +11,8 @@ label-on="Show all" label-off="Changes only" label-position="left" - ng-if="vm.runMode = 'report'"> + ng-if="!vm.hideToggle"> +
@@ -36,31 +37,31 @@
-
+
- +
- {{vm.getTypeName(result.ItemType)}} + {{vm.getTypeName(result.itemType)}}
- {{result.Name}} + {{result.name}}
- {{result.Change}} + {{result.change}}
- +
diff --git a/uSync8.BackOffice/App_Plugins/uSync8/components/uSyncReportViewComponent.js b/uSync.BackOffice/App_Plugins/uSync8/components/uSyncReportViewComponent.js similarity index 98% rename from uSync8.BackOffice/App_Plugins/uSync8/components/uSyncReportViewComponent.js rename to uSync.BackOffice/App_Plugins/uSync8/components/uSyncReportViewComponent.js index ee70fe0f..c2e9b9ff 100644 --- a/uSync8.BackOffice/App_Plugins/uSync8/components/uSyncReportViewComponent.js +++ b/uSync.BackOffice/App_Plugins/uSync8/components/uSyncReportViewComponent.js @@ -8,7 +8,8 @@ results: '<', hideAction: '<', hideLink: '<', - showAll: '<' + showAll: '<', + hideToggle: '<' }, controllerAs: 'vm', controller: uSyncReportViewController diff --git a/uSync8.BackOffice/App_Plugins/uSync8/components/usyncProgressViewComponent.js b/uSync.BackOffice/App_Plugins/uSync8/components/usyncProgressViewComponent.js similarity index 100% rename from uSync8.BackOffice/App_Plugins/uSync8/components/usyncProgressViewComponent.js rename to uSync.BackOffice/App_Plugins/uSync8/components/usyncProgressViewComponent.js diff --git a/uSync8.BackOffice/App_Plugins/uSync8/lang/en-US.xml b/uSync.BackOffice/App_Plugins/uSync8/lang/en-US.xml similarity index 100% rename from uSync8.BackOffice/App_Plugins/uSync8/lang/en-US.xml rename to uSync.BackOffice/App_Plugins/uSync8/lang/en-US.xml diff --git a/uSync8.BackOffice/App_Plugins/uSync8/package.manifest b/uSync.BackOffice/App_Plugins/uSync8/package.manifest similarity index 100% rename from uSync8.BackOffice/App_Plugins/uSync8/package.manifest rename to uSync.BackOffice/App_Plugins/uSync8/package.manifest diff --git a/uSync8.BackOffice/App_Plugins/uSync8/settings/default.html b/uSync.BackOffice/App_Plugins/uSync8/settings/default.html similarity index 96% rename from uSync8.BackOffice/App_Plugins/uSync8/settings/default.html rename to uSync.BackOffice/App_Plugins/uSync8/settings/default.html index 6c669cda..7ceb9485 100644 --- a/uSync8.BackOffice/App_Plugins/uSync8/settings/default.html +++ b/uSync.BackOffice/App_Plugins/uSync8/settings/default.html @@ -1,5 +1,6 @@ 
+
[v{{vm.versionInfo.VersionInfo.Core}}] @@ -8,7 +9,7 @@
- +
@@ -47,6 +48,7 @@
+
{{vm.version}}
{{vm.savings.title}} {{vm.savings.message}}
diff --git a/uSync8.BackOffice/App_Plugins/uSync8/settings/expansion.html b/uSync.BackOffice/App_Plugins/uSync8/settings/expansion.html similarity index 100% rename from uSync8.BackOffice/App_Plugins/uSync8/settings/expansion.html rename to uSync.BackOffice/App_Plugins/uSync8/settings/expansion.html diff --git a/uSync8.BackOffice/App_Plugins/uSync8/settings/expansionController.js b/uSync.BackOffice/App_Plugins/uSync8/settings/expansionController.js similarity index 100% rename from uSync8.BackOffice/App_Plugins/uSync8/settings/expansionController.js rename to uSync.BackOffice/App_Plugins/uSync8/settings/expansionController.js diff --git a/uSync8.BackOffice/App_Plugins/uSync8/settings/settings.html b/uSync.BackOffice/App_Plugins/uSync8/settings/settings.html similarity index 100% rename from uSync8.BackOffice/App_Plugins/uSync8/settings/settings.html rename to uSync.BackOffice/App_Plugins/uSync8/settings/settings.html diff --git a/uSync8.BackOffice/App_Plugins/uSync8/settings/settingsController.js b/uSync.BackOffice/App_Plugins/uSync8/settings/settingsController.js similarity index 100% rename from uSync8.BackOffice/App_Plugins/uSync8/settings/settingsController.js rename to uSync.BackOffice/App_Plugins/uSync8/settings/settingsController.js diff --git a/uSync8.BackOffice/App_Plugins/uSync8/settings/uSyncController.js b/uSync.BackOffice/App_Plugins/uSync8/settings/uSyncController.js similarity index 96% rename from uSync8.BackOffice/App_Plugins/uSync8/settings/uSyncController.js rename to uSync.BackOffice/App_Plugins/uSync8/settings/uSyncController.js index c651da69..62407533 100644 --- a/uSync8.BackOffice/App_Plugins/uSync8/settings/uSyncController.js +++ b/uSync.BackOffice/App_Plugins/uSync8/settings/uSyncController.js @@ -109,9 +109,19 @@ uSync8DashboardService.checkVersion() .then(function (result) { vm.versionInfo = result.data; - }) + }); + + uSync8DashboardService.getAddOns() + .then(function (result) { + vm.version = 'v' + result.data.Version; + if (result.data.AddOnString.length > 0) { + vm.version += ' + ' + result.data.AddOnString; + } + }); } + + /////////// function report(group) { resetStatus(modes.REPORT); @@ -158,7 +168,7 @@ function importItems(force, group) { resetStatus(modes.IMPORT); - vm.hideLink = true; + vm.hideLink = false; vm.importButton.state = 'busy'; uSync8DashboardService.importItems(force, group, getClientId()) diff --git a/uSync8.BackOffice/App_Plugins/uSync8/uSyncHub.js b/uSync.BackOffice/App_Plugins/uSync8/uSyncHub.js similarity index 100% rename from uSync8.BackOffice/App_Plugins/uSync8/uSyncHub.js rename to uSync.BackOffice/App_Plugins/uSync8/uSyncHub.js diff --git a/uSync8.BackOffice/App_Plugins/uSync8/uSyncService.js b/uSync.BackOffice/App_Plugins/uSync8/uSyncService.js similarity index 100% rename from uSync8.BackOffice/App_Plugins/uSync8/uSyncService.js rename to uSync.BackOffice/App_Plugins/uSync8/uSyncService.js diff --git a/uSync8.BackOffice/App_Plugins/uSync8/uSync_864.js b/uSync.BackOffice/App_Plugins/uSync8/uSync_864.js similarity index 100% rename from uSync8.BackOffice/App_Plugins/uSync8/uSync_864.js rename to uSync.BackOffice/App_Plugins/uSync8/uSync_864.js diff --git a/uSync8.BackOffice/App_Plugins/uSync8/usync.css b/uSync.BackOffice/App_Plugins/uSync8/usync.css similarity index 100% rename from uSync8.BackOffice/App_Plugins/uSync8/usync.css rename to uSync.BackOffice/App_Plugins/uSync8/usync.css diff --git a/uSync8.BackOffice/App_Plugins/uSync8/usync_864.css b/uSync.BackOffice/App_Plugins/uSync8/usync_864.css similarity index 100% rename from uSync8.BackOffice/App_Plugins/uSync8/usync_864.css rename to uSync.BackOffice/App_Plugins/uSync8/usync_864.css diff --git a/uSync8.BackOffice/BackOfficeConstants.cs b/uSync.BackOffice/BackOfficeConstants.cs similarity index 94% rename from uSync8.BackOffice/BackOfficeConstants.cs rename to uSync.BackOffice/BackOfficeConstants.cs index 072c555f..d815d8e1 100644 --- a/uSync8.BackOffice/BackOfficeConstants.cs +++ b/uSync.BackOffice/BackOfficeConstants.cs @@ -1,7 +1,9 @@ -namespace uSync8.BackOffice +namespace uSync.BackOffice { public static partial class uSyncBackOfficeConstants { + public const string ReleaseSuffix = "-core-alpha"; + public const string ConfigFile = "uSync8.config"; public static class Priorites diff --git a/uSync8.BackOffice/Config/uSync8.config b/uSync.BackOffice/Config/uSync8.config similarity index 82% rename from uSync8.BackOffice/Config/uSync8.config rename to uSync.BackOffice/Config/uSync8.config index f1fe5979..89e68bb0 100644 --- a/uSync8.BackOffice/Config/uSync8.config +++ b/uSync.BackOffice/Config/uSync8.config @@ -32,6 +32,15 @@ + + + + \ No newline at end of file diff --git a/uSync8.BackOffice/Configuration/BackOfficeConfig.cs b/uSync.BackOffice/Configuration/BackOfficeConfig.cs similarity index 89% rename from uSync8.BackOffice/Configuration/BackOfficeConfig.cs rename to uSync.BackOffice/Configuration/BackOfficeConfig.cs index 9c094e3f..5f136063 100644 --- a/uSync8.BackOffice/Configuration/BackOfficeConfig.cs +++ b/uSync.BackOffice/Configuration/BackOfficeConfig.cs @@ -7,12 +7,13 @@ using Newtonsoft.Json; using Newtonsoft.Json.Serialization; +using Umbraco.Composing; using Umbraco.Core; using Umbraco.Core.Logging; -using uSync8.Core.Extensions; +using uSync.Core.Extensions; -namespace uSync8.BackOffice.Configuration +namespace uSync.BackOffice.Configuration { /// /// uSync config loading / saving @@ -36,13 +37,15 @@ namespace uSync8.BackOffice.Configuration public class uSyncConfig { private readonly IProfilingLogger logger; - public uSyncSettings Settings { get; set; } - private string settingsFile = $"{Umbraco.Core.IO.SystemDirectories.Config}/{uSyncBackOfficeConstants.ConfigFile}"; + private readonly string settingsFile; public uSyncConfig(IProfilingLogger logger) { + var configFolder = new DirectoryInfo(Current.HostingEnvironment.MapPathContentRoot(Constants.SystemDirectories.Config)); + settingsFile = Path.Combine(configFolder.FullName, uSyncBackOfficeConstants.ConfigFile); + this.logger = logger; this.Settings = LoadSettings(); } @@ -61,7 +64,9 @@ public uSyncSettings LoadSettings() return SaveSettings(settings); } - settings.RootFolder = ValueFromWebConfigOrDefault("Folder", node.Element("Folder").ValueOrDefault(settings.RootFolder)); + settings.RootFolder = Current.HostingEnvironment.MapPathContentRoot("~/uSync/v9"); + + // settings.RootFolder = ValueFromWebConfigOrDefault("Folder", node.Element("Folder").ValueOrDefault(settings.RootFolder)); settings.UseFlatStructure = ValueFromWebConfigOrDefault("FlatFolders", node.Element("FlatFolders").ValueOrDefault(true)); settings.ImportAtStartup = ValueFromWebConfigOrDefault("ImportAtStartup", node.Element("ImportAtStartup").ValueOrDefault(true)); settings.ExportAtStartup = ValueFromWebConfigOrDefault("ExportAtStartup", node.Element("ExportAtStartup").ValueOrDefault(false)); @@ -93,6 +98,8 @@ public uSyncSettings LoadSettings() } } + settings.CustomMappings = LoadAppKeysFromNode(node, "Mappings", true); + // fire the loaded event, so things can tell when they are loaded. Reloaded?.Invoke(settings); @@ -146,6 +153,42 @@ private HandlerSet LoadSingleHandlerSet(XElement setNode, uSyncSettings defaultS } + /// + /// Loads a selection of app keys from a given node. + /// + /// + /// lets us load a dictionary from a key/value set. + /// + /// + /// + /// + /// + /// + /// + /// + private IDictionary LoadAppKeysFromNode(XElement root, string node, bool lowerCaseKey = false) + { + var AppSettings = new Dictionary(); + + var settingsNode = root.Element(node); + if (settingsNode != null) + { + foreach(var element in settingsNode.Elements("Add")) + { + var key = element.Attribute("Key").ValueOrDefault(string.Empty); + var value = element.Attribute("Value").ValueOrDefault(string.Empty); + + if (!string.IsNullOrWhiteSpace(key) && !string.IsNullOrWhiteSpace(value)) + { + var keyValue = lowerCaseKey ? key.ToLower() : key; + AppSettings[keyValue] = value; + } + } + } + + return AppSettings; + } + /// /// Save the settings to disk. /// @@ -351,7 +394,7 @@ public void SaveHandlerConfig(XElement node, HandlerSettings config, uSyncSettin /// private XElement GetSettingsFile(bool loadIfBlank = false) { - var filePath = Umbraco.Core.IO.IOHelper.MapPath(settingsFile); + var filePath = Current.IOHelper.MapPath(settingsFile); if (File.Exists(filePath)) { logger.Debug("Loading Settings from {filePath}", filePath); @@ -393,7 +436,7 @@ private void SaveSettingsFile(XElement node) var root = node.Parent; if (root != null) { - var filePath = Umbraco.Core.IO.IOHelper.MapPath(settingsFile); + var filePath = Current.IOHelper.MapPath(settingsFile); root.Save(filePath); } } diff --git a/uSync8.BackOffice/Configuration/ConfigExtensions.cs b/uSync.BackOffice/Configuration/ConfigExtensions.cs similarity index 92% rename from uSync8.BackOffice/Configuration/ConfigExtensions.cs rename to uSync.BackOffice/Configuration/ConfigExtensions.cs index ed741e58..32a6cc31 100644 --- a/uSync8.BackOffice/Configuration/ConfigExtensions.cs +++ b/uSync.BackOffice/Configuration/ConfigExtensions.cs @@ -1,6 +1,6 @@ using Umbraco.Core.Configuration; -namespace uSync8.BackOffice.Configuration +namespace uSync.BackOffice.Configuration { public static class ConfigExtensions { diff --git a/uSync8.BackOffice/Configuration/OverriddenValue.cs b/uSync.BackOffice/Configuration/OverriddenValue.cs similarity index 96% rename from uSync8.BackOffice/Configuration/OverriddenValue.cs rename to uSync.BackOffice/Configuration/OverriddenValue.cs index 952fd436..3bbf6858 100644 --- a/uSync8.BackOffice/Configuration/OverriddenValue.cs +++ b/uSync.BackOffice/Configuration/OverriddenValue.cs @@ -1,4 +1,4 @@ -namespace uSync8.BackOffice.Configuration +namespace uSync.BackOffice.Configuration { /// /// Overridden value - will let us use the value - but when diff --git a/uSync8.BackOffice/Configuration/uSyncHandlerSettings.cs b/uSync.BackOffice/Configuration/uSyncHandlerSettings.cs similarity index 97% rename from uSync8.BackOffice/Configuration/uSyncHandlerSettings.cs rename to uSync.BackOffice/Configuration/uSyncHandlerSettings.cs index 4f8ba743..8f7870d7 100644 --- a/uSync8.BackOffice/Configuration/uSyncHandlerSettings.cs +++ b/uSync.BackOffice/Configuration/uSyncHandlerSettings.cs @@ -5,7 +5,7 @@ using Umbraco.Core; -namespace uSync8.BackOffice.Configuration +namespace uSync.BackOffice.Configuration { [JsonObject(NamingStrategyType = typeof(DefaultNamingStrategy))] public class HandlerSettings diff --git a/uSync8.BackOffice/Configuration/uSyncSettings.cs b/uSync.BackOffice/Configuration/uSyncSettings.cs similarity index 91% rename from uSync8.BackOffice/Configuration/uSyncSettings.cs rename to uSync.BackOffice/Configuration/uSyncSettings.cs index 3e9f94bc..c4e23b00 100644 --- a/uSync8.BackOffice/Configuration/uSyncSettings.cs +++ b/uSync.BackOffice/Configuration/uSyncSettings.cs @@ -6,7 +6,7 @@ using Umbraco.Core; -namespace uSync8.BackOffice.Configuration +namespace uSync.BackOffice.Configuration { [JsonObject(NamingStrategyType = typeof(DefaultNamingStrategy))] public class uSyncSettings @@ -83,6 +83,12 @@ public class uSyncSettings /// public HandlerSet DefaultHandlerSet() => this.HandlerSets.Where(x => x.Name.InvariantEquals(this.DefaultSet)).FirstOrDefault(); + + /// + /// Custom mapping keys, allows users to add a simple config mapping + /// to make one property type to behave like an existing one + /// + public IDictionary CustomMappings { get; set; } } public class HandlerSet diff --git a/uSync8.BackOffice/Controllers/Trees/uSyncTreeController.cs b/uSync.BackOffice/Controllers/Trees/uSyncTreeController.cs similarity index 51% rename from uSync8.BackOffice/Controllers/Trees/uSyncTreeController.cs rename to uSync.BackOffice/Controllers/Trees/uSyncTreeController.cs index 6ca10a0b..9088e0b6 100644 --- a/uSync8.BackOffice/Controllers/Trees/uSyncTreeController.cs +++ b/uSync.BackOffice/Controllers/Trees/uSyncTreeController.cs @@ -1,13 +1,19 @@ -using System.Net.Http.Formatting; -using System.Web.Http.ModelBinding; + +using System.Net.Http.Formatting; + +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; using Umbraco.Core; +using Umbraco.Core.Services; +using Umbraco.Web.BackOffice.Trees; +using Umbraco.Web.Common.Attributes; +using Umbraco.Web.Common.ModelBinders; using Umbraco.Web.Models.Trees; -using Umbraco.Web.Mvc; using Umbraco.Web.Trees; -using Umbraco.Web.WebApi.Filters; +using Umbraco.Web.WebApi; -namespace uSync8.BackOffice.Controllers.Trees +namespace uSync.BackOffice.Controllers.Trees { [Tree(Constants.Applications.Settings, uSync.Trees.uSync, TreeGroup = uSync.Trees.Group, @@ -15,7 +21,13 @@ namespace uSync8.BackOffice.Controllers.Trees [PluginController(uSync.Name)] public class uSyncTreeController : TreeController { - protected override TreeNode CreateRootNode(FormDataCollection queryStrings) + public uSyncTreeController( + ILocalizedTextService localizedTextService, + UmbracoApiControllerTypeCollection umbracoApiControllerTypeCollection) + : base(localizedTextService, umbracoApiControllerTypeCollection) + { } + + protected override TreeNode CreateRootNode(FormCollection queryStrings) { var root = base.CreateRootNode(queryStrings); @@ -27,12 +39,12 @@ protected override TreeNode CreateRootNode(FormDataCollection queryStrings) return root; } - protected override MenuItemCollection GetMenuForNode(string id, [ModelBinder(typeof(HttpQueryStringModelBinder))] FormDataCollection queryStrings) + protected override MenuItemCollection GetMenuForNode(string id, [ModelBinder(typeof(HttpQueryStringModelBinder))] FormCollection queryStrings) { return null; } - protected override TreeNodeCollection GetTreeNodes(string id, [ModelBinder(typeof(HttpQueryStringModelBinder))] FormDataCollection queryStrings) + protected override TreeNodeCollection GetTreeNodes(string id, [ModelBinder(typeof(HttpQueryStringModelBinder))] FormCollection queryStrings) { return new TreeNodeCollection(); } diff --git a/uSync8.BackOffice/Controllers/ViewModels/AddOnInfo.cs b/uSync.BackOffice/Controllers/ViewModels/AddOnInfo.cs similarity index 84% rename from uSync8.BackOffice/Controllers/ViewModels/AddOnInfo.cs rename to uSync.BackOffice/Controllers/ViewModels/AddOnInfo.cs index 74828a07..5494b374 100644 --- a/uSync8.BackOffice/Controllers/ViewModels/AddOnInfo.cs +++ b/uSync.BackOffice/Controllers/ViewModels/AddOnInfo.cs @@ -3,9 +3,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Serialization; -using uSync8.BackOffice.Models; +using uSync.BackOffice.Models; -namespace uSync8.BackOffice.Controllers +namespace uSync.BackOffice.Controllers { [JsonObject(NamingStrategyType = typeof(DefaultNamingStrategy))] public class AddOnInfo diff --git a/uSync8.BackOffice/Controllers/ViewModels/uSyncOptions.cs b/uSync.BackOffice/Controllers/ViewModels/uSyncOptions.cs similarity index 93% rename from uSync8.BackOffice/Controllers/ViewModels/uSyncOptions.cs rename to uSync.BackOffice/Controllers/ViewModels/uSyncOptions.cs index e005fa31..1a6d8ed2 100644 --- a/uSync8.BackOffice/Controllers/ViewModels/uSyncOptions.cs +++ b/uSync.BackOffice/Controllers/ViewModels/uSyncOptions.cs @@ -3,7 +3,7 @@ using Newtonsoft.Json; using Newtonsoft.Json.Serialization; -namespace uSync8.BackOffice.Controllers +namespace uSync.BackOffice.Controllers { [JsonObject(NamingStrategyType = typeof(DefaultNamingStrategy))] public class uSyncOptions diff --git a/uSync8.BackOffice/Controllers/uSyncDashboardApiController.cs b/uSync.BackOffice/Controllers/uSyncDashboardApiController.cs similarity index 82% rename from uSync8.BackOffice/Controllers/uSyncDashboardApiController.cs rename to uSync.BackOffice/Controllers/uSyncDashboardApiController.cs index f39d03c6..4c5bb9a7 100644 --- a/uSync8.BackOffice/Controllers/uSyncDashboardApiController.cs +++ b/uSync.BackOffice/Controllers/uSyncDashboardApiController.cs @@ -5,28 +5,33 @@ using System.Net; using System.Net.Http; using System.Threading.Tasks; -using System.Web.Http; + +using Microsoft.AspNetCore.Mvc; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using Newtonsoft.Json.Serialization; +using System.Text.Json; +using System.Text.Json.Serialization; + +using Umbraco.Composing; using Umbraco.Core.Cache; -using Umbraco.Core.Logging; using Umbraco.Core.Composing; using Umbraco.Core.IO; -using Umbraco.Web.Mvc; -using Umbraco.Web.WebApi; -using Umbraco.Web.WebApi.Filters; +using Umbraco.Core.Logging; +using Umbraco.Web.BackOffice.Controllers; +using Umbraco.Web.BackOffice.Filters; +using Umbraco.Web.Common.Attributes; -using uSync8.BackOffice.Configuration; -using uSync8.BackOffice.Hubs; -using uSync8.BackOffice.Models; -using uSync8.BackOffice.SyncHandlers; +using uSync.BackOffice.Configuration; +using uSync.BackOffice.Hubs; +using uSync.BackOffice.Models; +using uSync.BackOffice.SyncHandlers; using Constants = Umbraco.Core.Constants; -namespace uSync8.BackOffice.Controllers +namespace uSync.BackOffice.Controllers { [PluginController("uSync")] [UmbracoApplicationAuthorize(Constants.Applications.Settings)] @@ -38,17 +43,30 @@ public class uSyncDashboardApiController : UmbracoAuthorizedApiController private uSyncSettings settings; private uSyncConfig Config; + private readonly IProfilingLogger logger; + + private readonly ITypeFinder typeFinder; + private readonly AppCaches appCaches; + public uSyncDashboardApiController( + ITypeFinder typeFinder, + AppCaches appCaches, uSyncService uSyncService, SyncHandlerFactory handlerFactory, - uSyncConfig config) + uSyncConfig config, + IProfilingLogger logger) { + this.typeFinder = typeFinder; + this.appCaches = appCaches; + this.Config = config; this.uSyncService = uSyncService; this.settings = Current.Configs.uSync(); this.handlerFactory = handlerFactory; + this.logger = logger; + uSyncConfig.Reloaded += BackOfficeConfig_Reloaded; } @@ -97,11 +115,13 @@ public IEnumerable GetHandlers() public IEnumerable Report(uSyncOptions options) { var hubClient = new HubClientService(options.ClientId); - return uSyncService.Report(settings.RootFolder, new SyncHandlerOptions() + var result = uSyncService.Report(settings.RootFolder, new SyncHandlerOptions() { Group = options.Group - }, - hubClient.Callbacks()); + }, hubClient.Callbacks()) + .ToArray(); + + return result; } [HttpPost] @@ -161,7 +181,7 @@ private string GetContent() { if (!Config.Settings.AddOnPing) return GetLocal(); - var cachedContent = AppCaches.RuntimeCache.GetCacheItem("usync_addon"); + var cachedContent = appCaches.RuntimeCache.GetCacheItem("usync_addon"); if (!string.IsNullOrEmpty(cachedContent)) return cachedContent; var remote = "https://jumoo.co.uk/usync/addon/82/"; @@ -172,7 +192,7 @@ private string GetContent() var content = client.DownloadString(remote); if (!string.IsNullOrWhiteSpace(content)) { - AppCaches.RuntimeCache.InsertCacheItem("usync_addon", () => content); + appCaches.RuntimeCache.InsertCacheItem("usync_addon", () => content); } return content; @@ -188,10 +208,11 @@ private string GetLocal() { try { - var localFile = IOHelper.MapPath("~/App_Plugins/uSync8/addons.json"); - if (File.Exists(localFile)) + var localFile = Current.IOHelper.MapPath("~/App_Plugins/uSync8/addons.json"); + if (System.IO.File.Exists(localFile)) { - return File.ReadAllText(localFile); + + return System.IO.File.ReadAllText(localFile); } } catch @@ -206,7 +227,7 @@ public AddOnInfo GetAddOns() { var addOnInfo = new AddOnInfo(); - var addOns = TypeFinder.FindClassesOfType(); + var addOns = typeFinder.FindClassesOfType(); foreach (var addOn in addOns) { var instance = Activator.CreateInstance(addOn) as ISyncAddOn; @@ -216,7 +237,8 @@ public AddOnInfo GetAddOns() } } - addOnInfo.Version = typeof(uSync8.BackOffice.uSync8BackOffice).Assembly.GetName().Version.ToString(); + addOnInfo.Version = typeof(uSyncBackOffice).Assembly.GetName().Version.ToString() + + uSyncBackOfficeConstants.ReleaseSuffix; addOnInfo.AddOns = addOnInfo.AddOns.OrderBy(x => x.SortOrder).ToList(); addOnInfo.AddOnString = string.Join(", ", addOnInfo.AddOns.Select(x => x.Name)); @@ -227,13 +249,13 @@ public AddOnInfo GetAddOns() [HttpGet] public async Task CheckVersion() { - var cacheInfo = AppCaches.RuntimeCache.GetCacheItem("usync_vcheck"); + var cacheInfo = appCaches.RuntimeCache.GetCacheItem("usync_vcheck"); if (cacheInfo != null) return cacheInfo; var info = await PerformCheck(); info.HandlersLoaded = settings.HandlerSets.Count > 0; - AppCaches.RuntimeCache.InsertCacheItem("usync_vcheck", () => info, new TimeSpan(6, 0, 0)); + appCaches.RuntimeCache.InsertCacheItem("usync_vcheck", () => info, new TimeSpan(6, 0, 0)); return info; } @@ -277,14 +299,14 @@ private async Task PerformCheck() } else { - Logger.Debug("Failed to get version info, {Content}", content); + logger.Debug("Failed to get version info, {Content}", content); } } } catch (Exception ex) { // can't ping. - Logger.Debug("Can't ping for version, {Exception}", ex.Message); + logger.Debug("Can't ping for version, {Exception}", ex.Message); } return new uSyncVersionCheck() diff --git a/uSync.BackOffice/Converters/JsonTypeConverter.cs b/uSync.BackOffice/Converters/JsonTypeConverter.cs new file mode 100644 index 00000000..26b8cfc8 --- /dev/null +++ b/uSync.BackOffice/Converters/JsonTypeConverter.cs @@ -0,0 +1,19 @@ +using System; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace uSync.BackOffice.Converters +{ + public class JsonTypeConverter : JsonConverter + { + public override Type Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + + public override void Write(Utf8JsonWriter writer, Type value, JsonSerializerOptions options) + { + writer.WriteStringValue(value.FullName); + } + } +} diff --git a/uSync.BackOffice/Extensions/uSyncActionExtensions.cs b/uSync.BackOffice/Extensions/uSyncActionExtensions.cs new file mode 100644 index 00000000..68f36e31 --- /dev/null +++ b/uSync.BackOffice/Extensions/uSyncActionExtensions.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace uSync.BackOffice +{ + public static class uSyncActionExtensions + { + /// + /// does this list of actions have any that in an error state? + /// + public static bool ContainsErrors(this IEnumerable actions) + => actions.Any(x => x.Change >= Core.ChangeType.Fail); + + /// + /// count how many actions in this list are for changes + /// + public static int CountChanges(this IEnumerable actions) + => actions.Count(x => x.Change > Core.ChangeType.NoChange); + } +} diff --git a/uSync8.BackOffice/Hubs/HubClientService.cs b/uSync.BackOffice/Hubs/HubClientService.cs similarity index 87% rename from uSync8.BackOffice/Hubs/HubClientService.cs rename to uSync.BackOffice/Hubs/HubClientService.cs index 8a4e5b14..d5b3a1fa 100644 --- a/uSync8.BackOffice/Hubs/HubClientService.cs +++ b/uSync.BackOffice/Hubs/HubClientService.cs @@ -1,22 +1,21 @@ using System; -using Microsoft.AspNet.SignalR; - -namespace uSync8.BackOffice.Hubs +namespace uSync.BackOffice.Hubs { public class HubClientService { - private readonly IHubContext hubContext; + // private readonly IHubContext hubContext; private readonly string clientId; public HubClientService(string clientId) { - hubContext = GlobalHost.ConnectionManager.GetHubContext(); + // hubContext = GlobalHost.ConnectionManager.GetHubContext(); this.clientId = clientId; } public void SendMessage(TObject item) { + /* if (hubContext != null && !string.IsNullOrWhiteSpace(clientId)) { var client = hubContext.Clients.Client(clientId); @@ -28,10 +27,12 @@ public void SendMessage(TObject item) hubContext.Clients.All.Add(item); } + */ } public void SendUpdate(Object message) { + /* if (hubContext != null && !string.IsNullOrWhiteSpace(clientId)) { var client = hubContext.Clients.Client(clientId); @@ -42,6 +43,7 @@ public void SendUpdate(Object message) } hubContext.Clients.All.Update(message); } + */ } diff --git a/uSync8.BackOffice/Hubs/uSyncCallbacks.cs b/uSync.BackOffice/Hubs/uSyncCallbacks.cs similarity index 75% rename from uSync8.BackOffice/Hubs/uSyncCallbacks.cs rename to uSync.BackOffice/Hubs/uSyncCallbacks.cs index a2960f42..ca7b968f 100644 --- a/uSync8.BackOffice/Hubs/uSyncCallbacks.cs +++ b/uSync.BackOffice/Hubs/uSyncCallbacks.cs @@ -1,8 +1,8 @@ -using uSync8.BackOffice.SyncHandlers; +using uSync.BackOffice.SyncHandlers; -using static uSync8.BackOffice.uSyncService; +using static uSync.BackOffice.uSyncService; -namespace uSync8.BackOffice +namespace uSync.BackOffice { public class uSyncCallbacks { diff --git a/uSync8.BackOffice/Hubs/uSyncHub.cs b/uSync.BackOffice/Hubs/uSyncHub.cs similarity index 51% rename from uSync8.BackOffice/Hubs/uSyncHub.cs rename to uSync.BackOffice/Hubs/uSyncHub.cs index f95a9a5f..1dc9627f 100644 --- a/uSync8.BackOffice/Hubs/uSyncHub.cs +++ b/uSync.BackOffice/Hubs/uSyncHub.cs @@ -1,10 +1,10 @@ using System; -using Microsoft.AspNet.SignalR; +// using Microsoft.AspNet.SignalR; -namespace uSync8.BackOffice.Hubs +namespace uSync.BackOffice.Hubs { - public class uSyncHub : Hub + public class uSyncHub // : Hub { public string GetTime() => DateTime.Now.ToString(); diff --git a/uSync8.BackOffice/Hubs/uSyncUpdateMessage.cs b/uSync.BackOffice/Hubs/uSyncUpdateMessage.cs similarity index 90% rename from uSync8.BackOffice/Hubs/uSyncUpdateMessage.cs rename to uSync.BackOffice/Hubs/uSyncUpdateMessage.cs index 45b2881f..defd9195 100644 --- a/uSync8.BackOffice/Hubs/uSyncUpdateMessage.cs +++ b/uSync.BackOffice/Hubs/uSyncUpdateMessage.cs @@ -1,7 +1,7 @@ using Newtonsoft.Json; using Newtonsoft.Json.Serialization; -namespace uSync8.BackOffice.Hubs +namespace uSync.BackOffice.Hubs { [JsonObject(NamingStrategyType = typeof(DefaultNamingStrategy))] public class uSyncUpdateMessage diff --git a/uSync8.BackOffice/Models/ISyncAddOn.cs b/uSync.BackOffice/Models/ISyncAddOn.cs similarity index 97% rename from uSync8.BackOffice/Models/ISyncAddOn.cs rename to uSync.BackOffice/Models/ISyncAddOn.cs index fb6ee261..d86eeddc 100644 --- a/uSync8.BackOffice/Models/ISyncAddOn.cs +++ b/uSync.BackOffice/Models/ISyncAddOn.cs @@ -1,7 +1,7 @@ using Newtonsoft.Json; using Newtonsoft.Json.Serialization; -namespace uSync8.BackOffice.Models +namespace uSync.BackOffice.Models { /// /// An add on to usync, which allows you to inject a view onto the usync page diff --git a/uSync8.BackOffice/Models/SyncProgressModels.cs b/uSync.BackOffice/Models/SyncProgressModels.cs similarity index 77% rename from uSync8.BackOffice/Models/SyncProgressModels.cs rename to uSync.BackOffice/Models/SyncProgressModels.cs index baa0689f..83220dfc 100644 --- a/uSync8.BackOffice/Models/SyncProgressModels.cs +++ b/uSync.BackOffice/Models/SyncProgressModels.cs @@ -4,16 +4,34 @@ using Newtonsoft.Json; using Newtonsoft.Json.Serialization; -using uSync8.BackOffice.SyncHandlers; +using uSync.BackOffice.SyncHandlers; -namespace uSync8.BackOffice +namespace uSync.BackOffice { + /// + /// Progress summary - object that tells the UI to draw the handler icons while uSync works. + /// [JsonObject(NamingStrategyType = typeof(DefaultNamingStrategy))] public class SyncProgressSummary { + /// + /// current count (progress) of where we are upto. + /// public int Count { get; set; } + + /// + /// How many steps we think we are going to take. + /// public int Total { get; set; } + + /// + /// Message to display to user. + /// public string Message { get; set; } + + /// + /// Summary (icons, state) of the handlers + /// public List Handlers { get; set; } public SyncProgressSummary( @@ -94,10 +112,24 @@ public void UpdateHandler(string name, HandlerStatus status, string message, int [JsonObject(NamingStrategyType = typeof(DefaultNamingStrategy))] public class SyncHandlerSummary { + /// + /// The icon the user sees for this handler. + /// public string Icon { get; set; } + + /// + /// Name shown under the handler + /// public string Name { get; set; } + + /// + /// Current status of the handler + /// public HandlerStatus Status { get; set; } + /// + /// number of changes that have been processed + /// public int Changes { get; set; } /// @@ -106,6 +138,9 @@ public class SyncHandlerSummary public bool InError { get; set; } } + /// + /// current status of a handler. + /// public enum HandlerStatus { Pending, diff --git a/uSync8.BackOffice/Services/SyncFileService.cs b/uSync.BackOffice/Services/SyncFileService.cs similarity index 98% rename from uSync8.BackOffice/Services/SyncFileService.cs rename to uSync.BackOffice/Services/SyncFileService.cs index d589a9e6..546a7db2 100644 --- a/uSync8.BackOffice/Services/SyncFileService.cs +++ b/uSync.BackOffice/Services/SyncFileService.cs @@ -3,16 +3,16 @@ using System.IO; using System.Linq; using System.Text; -using System.Xml; using System.Xml.Linq; using System.Xml.Serialization; -using Umbraco.Core.Composing; +using Umbraco.Composing; using Umbraco.Core.IO; using Umbraco.Core.Logging; -using uSync8.BackOffice.Configuration; -namespace uSync8.BackOffice.Services +using uSync.BackOffice.Configuration; + +namespace uSync.BackOffice.Services { /// /// putting all file actions in a service, @@ -42,7 +42,7 @@ private void BackOfficeConfig_Reloaded(uSyncSettings settings) public string GetAbsPath(string path) { if (IsLocalPath(path)) return CleanLocalPath(path); - return CleanLocalPath(IOHelper.MapPath(path.TrimStart('/'))); + return CleanLocalPath(Current.IOHelper.MapPath(path.TrimStart('/'))); } /// diff --git a/uSync8.BackOffice/Services/uSyncService.cs b/uSync.BackOffice/Services/uSyncService.cs similarity index 86% rename from uSync8.BackOffice/Services/uSyncService.cs rename to uSync.BackOffice/Services/uSyncService.cs index 726bc33c..a8f3b11c 100644 --- a/uSync8.BackOffice/Services/uSyncService.cs +++ b/uSync.BackOffice/Services/uSyncService.cs @@ -2,16 +2,19 @@ using System.Collections.Generic; using System.Diagnostics; using System.Linq; -using Umbraco.Core.Cache; + +using Umbraco.Composing; +using Umbraco.Core; using Umbraco.Core.Composing; using Umbraco.Core.Configuration; +using Umbraco.Core.Hosting; using Umbraco.Core.Logging; -using uSync8.BackOffice.Configuration; -using uSync8.BackOffice.Services; -using uSync8.BackOffice.SyncHandlers; +using uSync.BackOffice.Configuration; +using uSync.BackOffice.Services; +using uSync.BackOffice.SyncHandlers; -namespace uSync8.BackOffice +namespace uSync.BackOffice { /// @@ -29,10 +32,14 @@ public partial class uSyncService private readonly IProfilingLogger logger; private SyncFileService syncFileService; + private readonly bool IsDebugMode; + + public uSyncService( SyncHandlerFactory handlerFactory, IProfilingLogger logger, - SyncFileService syncFileService) + SyncFileService syncFileService, + IHostingEnvironment hostingEnvironment) { this.handlerFactory = handlerFactory; @@ -45,6 +52,8 @@ public uSyncService( uSyncTriggers.DoExport += USyncTriggers_DoExport; uSyncTriggers.DoImport += USyncTriggers_DoImport; + + IsDebugMode = hostingEnvironment.IsDebugMode; } private void BackOfficeConfig_Reloaded(uSyncSettings settings) @@ -103,7 +112,7 @@ public IEnumerable Report(string folder, IEnumerable x.Handler), "Reporting", handlers.Count()); - if (GlobalSettings.DebugMode && settings.ReportDebug) + if (this.IsDebugMode && settings.ReportDebug) { logger.Warn("Running Report Debug - this can be a slow process, don't enable unless you need it"); // debug - full export into a dated folder. @@ -126,7 +135,9 @@ public IEnumerable Report(string folder, IEnumerable Report(string folder, IEnumerable("uSync Report: {handlerCount} handlers, processed {itemCount} items, {changeCount} changes in {ElapsedMilliseconds}ms", - handlers.Count(), actions.Count, actions.Where(x => x.Change > Core.ChangeType.NoChange).Count(), + handlers.Count(), actions.Count, + actions.CountChanges(), sw.ElapsedMilliseconds); callbacks?.Update?.Invoke($"Processed {actions.Count} items in {sw.ElapsedMilliseconds}ms", 1, 1); @@ -199,7 +211,7 @@ public IEnumerable Import(string folder, bool force, IEnumerable Import(string folder, bool force, IEnumerable Import(string folder, bool force, IEnumerable("uSync Import: {handlerCount} handlers, processed {itemCount} items, {changeCount} changes in {ElapsedMilliseconds}ms", - handlers.Count(), actions.Count, actions.Where(x => x.Change > Core.ChangeType.NoChange).Count(), + handlers.Count(), + actions.Count, + actions.CountChanges(), sw.ElapsedMilliseconds); callbacks?.Update?.Invoke($"Processed {actions.Count} items in {sw.ElapsedMilliseconds}ms", 1, 1); @@ -283,7 +300,7 @@ public IEnumerable Import(string folder, bool force, IEnumerable Export(string folder, IEnumerable Export(string folder, IEnumerable("uSync Export: {handlerCount} handlers, processed {itemCount} items, {changeCount} changes in {ElapsedMilliseconds}ms", - handlers.Count(), actions.Count, actions.Where(x => x.Change > Core.ChangeType.NoChange).Count(), + handlers.Count(), actions.Count, + actions.CountChanges(), sw.ElapsedMilliseconds); callbacks?.Update?.Invoke($"Processed {actions.Count} items in {sw.ElapsedMilliseconds}ms", 1, 1); @@ -430,17 +450,6 @@ public IEnumerable Export(string folder, SyncEventCallback callback #endregion - /// - /// calculate the number of actions in a list that are actually changes - /// - /// List of actions to parse - /// number of actions that contain a change of some form - private int ChangeCount(IEnumerable actions) - => actions.Count(x => x.Change > Core.ChangeType.NoChange); - - private bool ContainsErrors(IEnumerable actions) - => actions.Any(x => x.Change >= Core.ChangeType.Fail); - /// /// Do an import triggered by an event. /// @@ -451,9 +460,10 @@ private void USyncTriggers_DoImport(uSyncTriggerArgs e) { logger.Info("Import Triggered by downlevel change {0}", e.Folder); - var handlers = GetHandlersByEntitytype(e.EntityTypes, e.HandlerOptions); - if (handlers.Count > 0) - this.Import(e.Folder, false, handlers, null); + var handlers = handlerFactory + .GetValidHandlersByEntityType(e.EntityTypes, e.HandlerOptions); + + if (handlers.Any()) this.Import(e.Folder, false, handlers, null); } } @@ -466,33 +476,12 @@ private void USyncTriggers_DoExport(uSyncTriggerArgs e) if (e.EntityTypes != null && !string.IsNullOrWhiteSpace(e.Folder)) { logger.Info("Export Triggered by downlevel change {0}", e.Folder); - var handlers = GetHandlersByEntitytype(e.EntityTypes, e.HandlerOptions); - if (handlers.Count > 0) - { - this.Export(e.Folder, handlers, null); - } - } - } - /// - /// Get a list of handlers for a set of entity types. - /// - /// Entity types to find handlers for - /// Options to use when loading the handlers - /// List of Handler/Config pairs for handlers for entity types - private IList GetHandlersByEntitytype(IEnumerable entityTypes, SyncHandlerOptions handlerOptions) - { - var handlers = new List(); + var handlers = handlerFactory + .GetValidHandlersByEntityType(e.EntityTypes, e.HandlerOptions); - foreach (var entityType in entityTypes) - { - var handler = handlerFactory.GetValidHandlerByEntityType(entityType, handlerOptions); - if (handler != null) - handlers.Add(handler); + if (handlers.Any()) this.Export(e.Folder, handlers, null); } - - return handlers; } - } } diff --git a/uSync8.BackOffice/Services/uSyncService_Events.cs b/uSync.BackOffice/Services/uSyncService_Events.cs similarity index 96% rename from uSync8.BackOffice/Services/uSyncService_Events.cs rename to uSync.BackOffice/Services/uSyncService_Events.cs index 37fbd4b2..2c86900f 100644 --- a/uSync8.BackOffice/Services/uSyncService_Events.cs +++ b/uSync.BackOffice/Services/uSyncService_Events.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using uSync8.BackOffice.SyncHandlers; +using uSync.BackOffice.SyncHandlers; -namespace uSync8.BackOffice +namespace uSync.BackOffice { public delegate void uSyncBulkEventHandler(uSyncBulkEventArgs e); diff --git a/uSync8.BackOffice/Services/uSyncTriggers.cs b/uSync.BackOffice/Services/uSyncTriggers.cs similarity index 96% rename from uSync8.BackOffice/Services/uSyncTriggers.cs rename to uSync.BackOffice/Services/uSyncTriggers.cs index 71ee63a3..f5c4212c 100644 --- a/uSync8.BackOffice/Services/uSyncTriggers.cs +++ b/uSync.BackOffice/Services/uSyncTriggers.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; -using uSync8.BackOffice.SyncHandlers; +using uSync.BackOffice.SyncHandlers; -namespace uSync8.BackOffice +namespace uSync.BackOffice { internal delegate void uSyncTriggerEventHandler(uSyncTriggerArgs e); diff --git a/uSync8.BackOffice/SyncHandlers/Handlers/ContentTypeHandler.cs b/uSync.BackOffice/SyncHandlers/Handlers/ContentTypeHandler.cs similarity index 70% rename from uSync8.BackOffice/SyncHandlers/Handlers/ContentTypeHandler.cs rename to uSync.BackOffice/SyncHandlers/Handlers/ContentTypeHandler.cs index 67b8d2dc..9008eac4 100644 --- a/uSync8.BackOffice/SyncHandlers/Handlers/ContentTypeHandler.cs +++ b/uSync.BackOffice/SyncHandlers/Handlers/ContentTypeHandler.cs @@ -7,17 +7,18 @@ using Umbraco.Core.Models.Entities; using Umbraco.Core.Services; using Umbraco.Core.Services.Implement; +using Umbraco.Core.Strings; -using uSync8.BackOffice.Configuration; -using uSync8.BackOffice.Services; -using uSync8.Core; -using uSync8.Core.Dependency; -using uSync8.Core.Serialization; -using uSync8.Core.Tracking; +using uSync.BackOffice.Configuration; +using uSync.BackOffice.Services; +using uSync.Core; +using uSync.Core.Dependency; +using uSync.Core.Serialization; +using uSync.Core.Tracking; using static Umbraco.Core.Constants; -namespace uSync8.BackOffice.SyncHandlers.Handlers +namespace uSync.BackOffice.SyncHandlers.Handlers { [SyncHandler("contentTypeHandler", "DocTypes", "ContentTypes", uSyncBackOfficeConstants.Priorites.ContentTypes, IsTwoPass = true, Icon = "icon-item-arrangement", EntityType = UdiEntityType.DocumentType)] @@ -26,6 +27,7 @@ public class ContentTypeHandler : SyncHandlerContainerBase serializer, ISyncItemFactory syncItemFactory, SyncFileService syncFileService) - : base(entityService, logger, appCaches, serializer, syncItemFactory, syncFileService) - { - this.contentTypeService = contentTypeService; - } - - [Obsolete("Use constructors with collections")] - protected ContentTypeHandler( - IEntityService entityService, - IProfilingLogger logger, - IContentTypeService contentTypeService, - ISyncSerializer serializer, - ISyncTracker tracker, - AppCaches appCaches, - ISyncDependencyChecker checker, - SyncFileService fileService) - : base(entityService, logger, serializer, tracker, appCaches, checker, fileService) + : base(shortStringHelper, entityService, logger, appCaches, serializer, syncItemFactory, syncFileService) { this.contentTypeService = contentTypeService; } @@ -80,10 +67,10 @@ protected override string GetItemFileName(IUmbracoEntity item, bool useGuid) if (item is IContentType contentItem) { - return contentItem.Alias.ToSafeFileName(); + return contentItem.Alias.ToSafeFileName(shortStringHelper); } - return item.Name.ToSafeFileName(); + return item.Name.ToSafeFileName(shortStringHelper); } protected override IContentType GetFromService(int id) @@ -95,6 +82,12 @@ protected override IContentType GetFromService(Guid key) protected override IContentType GetFromService(string alias) => contentTypeService.Get(alias); + protected override IEntity GetContainer(int id) + => contentTypeService.GetContainer(id); + + protected override IEntity GetContainer(Guid key) + => contentTypeService.GetContainer(key); + protected override void DeleteFolder(int id) => contentTypeService.DeleteContainer(id); diff --git a/uSync8.BackOffice/SyncHandlers/Handlers/DataTypeHandler.cs b/uSync.BackOffice/SyncHandlers/Handlers/DataTypeHandler.cs similarity index 73% rename from uSync8.BackOffice/SyncHandlers/Handlers/DataTypeHandler.cs rename to uSync.BackOffice/SyncHandlers/Handlers/DataTypeHandler.cs index e3511185..171f014c 100644 --- a/uSync8.BackOffice/SyncHandlers/Handlers/DataTypeHandler.cs +++ b/uSync.BackOffice/SyncHandlers/Handlers/DataTypeHandler.cs @@ -9,17 +9,18 @@ using Umbraco.Core.Models.Entities; using Umbraco.Core.Services; using Umbraco.Core.Services.Implement; +using Umbraco.Core.Strings; -using uSync8.BackOffice.Configuration; -using uSync8.BackOffice.Services; -using uSync8.Core; -using uSync8.Core.Dependency; -using uSync8.Core.Serialization; -using uSync8.Core.Tracking; +using uSync.BackOffice.Configuration; +using uSync.BackOffice.Services; +using uSync.Core; +using uSync.Core.Dependency; +using uSync.Core.Serialization; +using uSync.Core.Tracking; using static Umbraco.Core.Constants; -namespace uSync8.BackOffice.SyncHandlers.Handlers +namespace uSync.BackOffice.SyncHandlers.Handlers { [SyncHandler("dataTypeHandler", "Datatypes", "DataTypes", uSyncBackOfficeConstants.Priorites.DataTypes, Icon = "icon-autofill", EntityType = UdiEntityType.DataType)] @@ -29,6 +30,7 @@ public class DataTypeHandler : SyncHandlerContainerBase serializer, ISyncItemFactory syncItemFactory, SyncFileService syncFileService) - : base(entityService, logger, appCaches, serializer, syncItemFactory, syncFileService) - { - this.dataTypeService = dataTypeService; - } - - - [Obsolete("Use constructors with collections")] - protected DataTypeHandler( - IEntityService entityService, - IDataTypeService dataTypeService, - IProfilingLogger logger, - ISyncSerializer serializer, - ISyncDependencyChecker checker, - ISyncTracker tracker, - AppCaches appCaches, - SyncFileService syncFileService) - : base(entityService, logger, serializer, tracker, appCaches, checker, syncFileService) + : base(shortStringHelper, entityService, logger, appCaches, serializer, syncItemFactory, syncFileService) { this.dataTypeService = dataTypeService; } @@ -72,7 +58,7 @@ protected override void InitializeEvents(HandlerSettings settings) protected override string GetItemFileName(IUmbracoEntity item, bool useGuid) { if (useGuid) return item.Key.ToString(); - return item.Name.ToSafeAlias(); + return item.Name.ToSafeAlias(shortStringHelper); } protected override void DeleteFolder(int id) @@ -103,5 +89,12 @@ protected override IDataType GetFromService(string alias) protected override void DeleteViaService(IDataType item) => dataTypeService.Delete(item); + + protected override IEntity GetContainer(int id) + => dataTypeService.GetContainer(id); + + protected override IEntity GetContainer(Guid key) + => dataTypeService.GetContainer(key); + } } diff --git a/uSync8.BackOffice/SyncHandlers/Handlers/LanguageHandler.cs b/uSync.BackOffice/SyncHandlers/Handlers/LanguageHandler.cs similarity index 86% rename from uSync8.BackOffice/SyncHandlers/Handlers/LanguageHandler.cs rename to uSync.BackOffice/SyncHandlers/Handlers/LanguageHandler.cs index 396b78be..d4e78023 100644 --- a/uSync8.BackOffice/SyncHandlers/Handlers/LanguageHandler.cs +++ b/uSync.BackOffice/SyncHandlers/Handlers/LanguageHandler.cs @@ -4,6 +4,7 @@ using System.IO; using System.Linq; +using Umbraco.Composing; using Umbraco.Core; using Umbraco.Core.Cache; using Umbraco.Core.Logging; @@ -11,18 +12,19 @@ using Umbraco.Core.Models.Entities; using Umbraco.Core.Services; using Umbraco.Core.Services.Implement; +using Umbraco.Core.Strings; -using uSync8.BackOffice.Configuration; -using uSync8.BackOffice.Services; -using uSync8.Core; -using uSync8.Core.Dependency; -using uSync8.Core.Extensions; -using uSync8.Core.Serialization; -using uSync8.Core.Tracking; +using uSync.BackOffice.Configuration; +using uSync.BackOffice.Services; +using uSync.Core; +using uSync.Core.Dependency; +using uSync.Core.Extensions; +using uSync.Core.Serialization; +using uSync.Core.Tracking; using static Umbraco.Core.Constants; -namespace uSync8.BackOffice.SyncHandlers.Handlers +namespace uSync.BackOffice.SyncHandlers.Handlers { [SyncHandler("languageHandler", "Languages", "Languages", uSyncBackOfficeConstants.Priorites.Languages, Icon = "icon-globe", EntityType = UdiEntityType.Language, IsTwoPass = true)] @@ -31,6 +33,7 @@ public class LanguageHandler : SyncHandlerBase, private readonly ILocalizationService localizationService; public LanguageHandler( + IShortStringHelper shortStringHelper, ILocalizationService localizationService, IEntityService entityService, IProfilingLogger logger, @@ -38,22 +41,7 @@ public LanguageHandler( ISyncSerializer serializer, ISyncItemFactory syncItemFactory, SyncFileService syncFileService) - : base(entityService, logger, appCaches, serializer, syncItemFactory, syncFileService) - { - this.localizationService = localizationService; - } - - [Obsolete("Use constructors with collections")] - protected LanguageHandler( - IEntityService entityService, - IProfilingLogger logger, - ILocalizationService localizationService, - ISyncSerializer serializer, - ISyncTracker tracker, - AppCaches appCaches, - ISyncDependencyChecker checker, - SyncFileService syncFileService) - : base(entityService, logger, serializer, tracker, appCaches, checker, syncFileService) + : base(shortStringHelper, entityService, logger, appCaches, serializer, syncItemFactory, syncFileService) { this.localizationService = localizationService; } @@ -70,7 +58,7 @@ protected override string GetPath(string folder, ILanguage item, bool GuidNames, } protected override string GetItemPath(ILanguage item, bool useGuid, bool isFlat) - => item.IsoCode.ToSafeFileName(); + => item.IsoCode.ToSafeFileName(shortStringHelper); protected override void InitializeEvents(HandlerSettings settings) { @@ -87,7 +75,7 @@ protected override void InitializeEvents(HandlerSettings settings) private void LocalizationService_SavingLanguage(ILocalizationService sender, Umbraco.Core.Events.SaveEventArgs e) { - if (uSync8BackOffice.eventsPaused) return; + if (uSyncBackOffice.eventsPaused) return; foreach (var item in e.SavedEntities) { @@ -103,7 +91,7 @@ private void LocalizationService_SavingLanguage(ILocalizationService sender, Umb private void LocalizationService_SavedLanguage(ILocalizationService sender, Umbraco.Core.Events.SaveEventArgs e) { - if (uSync8BackOffice.eventsPaused) return; + if (uSyncBackOffice.eventsPaused) return; foreach (var item in e.SavedEntities) { diff --git a/uSync8.BackOffice/SyncHandlers/Handlers/MacroHandler.cs b/uSync.BackOffice/SyncHandlers/Handlers/MacroHandler.cs similarity index 76% rename from uSync8.BackOffice/SyncHandlers/Handlers/MacroHandler.cs rename to uSync.BackOffice/SyncHandlers/Handlers/MacroHandler.cs index 640b4a36..ed7f356f 100644 --- a/uSync8.BackOffice/SyncHandlers/Handlers/MacroHandler.cs +++ b/uSync.BackOffice/SyncHandlers/Handlers/MacroHandler.cs @@ -9,17 +9,18 @@ using Umbraco.Core.Models.Entities; using Umbraco.Core.Services; using Umbraco.Core.Services.Implement; +using Umbraco.Core.Strings; -using uSync8.BackOffice.Configuration; -using uSync8.BackOffice.Services; -using uSync8.Core; -using uSync8.Core.Dependency; -using uSync8.Core.Serialization; -using uSync8.Core.Tracking; +using uSync.BackOffice.Configuration; +using uSync.BackOffice.Services; +using uSync.Core; +using uSync.Core.Dependency; +using uSync.Core.Serialization; +using uSync.Core.Tracking; using static Umbraco.Core.Constants; -namespace uSync8.BackOffice.SyncHandlers.Handlers +namespace uSync.BackOffice.SyncHandlers.Handlers { [SyncHandler("macroHandler", "Macros", "Macros", uSyncBackOfficeConstants.Priorites.Macros, Icon = "icon-settings-alt", EntityType = UdiEntityType.Macro)] @@ -28,6 +29,7 @@ public class MacroHandler : SyncHandlerBase, ISyncExtende private readonly IMacroService macroService; public MacroHandler( + IShortStringHelper shortStringHelper, IMacroService macroService, IEntityService entityService, IProfilingLogger logger, @@ -35,25 +37,12 @@ public MacroHandler( ISyncSerializer serializer, ISyncItemFactory syncItemFactory, SyncFileService syncFileService) - : base(entityService, logger, appCaches, serializer, syncItemFactory, syncFileService) - { - this.macroService = macroService; - } - - [Obsolete("Use constructors with collections")] - protected MacroHandler(IEntityService entityService, - IProfilingLogger logger, - IMacroService macroService, - ISyncSerializer serializer, - ISyncTracker tracker, - AppCaches appCaches, - ISyncDependencyChecker checker, - SyncFileService syncFileService) - : base(entityService, logger, serializer, tracker, appCaches, checker, syncFileService) + : base(shortStringHelper, entityService, logger, appCaches, serializer, syncItemFactory, syncFileService) { this.macroService = macroService; } + /// /// overrider the default export, because macros, don't exist as an object type??? /// @@ -83,7 +72,7 @@ protected override IMacro GetFromService(int id) protected override string GetItemPath(IMacro item, bool useGuid, bool isFlat) { if (useGuid) return item.Key.ToString(); - return item.Alias.ToSafeAlias(); + return item.Alias.ToSafeAlias(shortStringHelper); } protected override void InitializeEvents(HandlerSettings settings) diff --git a/uSync8.BackOffice/SyncHandlers/Handlers/MediaTypeHandler.cs b/uSync.BackOffice/SyncHandlers/Handlers/MediaTypeHandler.cs similarity index 68% rename from uSync8.BackOffice/SyncHandlers/Handlers/MediaTypeHandler.cs rename to uSync.BackOffice/SyncHandlers/Handlers/MediaTypeHandler.cs index b8f6e62b..d85a4900 100644 --- a/uSync8.BackOffice/SyncHandlers/Handlers/MediaTypeHandler.cs +++ b/uSync.BackOffice/SyncHandlers/Handlers/MediaTypeHandler.cs @@ -7,17 +7,18 @@ using Umbraco.Core.Models.Entities; using Umbraco.Core.Services; using Umbraco.Core.Services.Implement; +using Umbraco.Core.Strings; -using uSync8.BackOffice.Configuration; -using uSync8.BackOffice.Services; -using uSync8.Core; -using uSync8.Core.Dependency; -using uSync8.Core.Serialization; -using uSync8.Core.Tracking; +using uSync.BackOffice.Configuration; +using uSync.BackOffice.Services; +using uSync.Core; +using uSync.Core.Dependency; +using uSync.Core.Serialization; +using uSync.Core.Tracking; using static Umbraco.Core.Constants; -namespace uSync8.BackOffice.SyncHandlers.Handlers +namespace uSync.BackOffice.SyncHandlers.Handlers { [SyncHandler("mediaTypeHandler", "Media Types", "MediaTypes", uSyncBackOfficeConstants.Priorites.MediaTypes, IsTwoPass = true, Icon = "icon-thumbnails", EntityType = UdiEntityType.MediaType)] @@ -26,6 +27,7 @@ public class MediaTypeHandler : SyncHandlerContainerBase serializer, ISyncItemFactory syncItemFactory, SyncFileService syncFileService) - : base(entityService, logger, appCaches, serializer, syncItemFactory, syncFileService) + : base(shortStringHelper, entityService, logger, appCaches, serializer, syncItemFactory, syncFileService) { this.mediaTypeService = mediaTypeService; } - [Obsolete("Use constructors with collections")] - protected MediaTypeHandler( - IEntityService entityService, - IMediaTypeService mediaTypeService, - IProfilingLogger logger, - ISyncSerializer serializer, - ISyncTracker tracker, - AppCaches appCaches, - ISyncDependencyChecker checker, - SyncFileService syncFileService) - : base(entityService, logger, serializer, tracker, appCaches, checker, syncFileService) - { - this.mediaTypeService = mediaTypeService; - } - protected override void InitializeEvents(HandlerSettings settings) @@ -72,10 +59,10 @@ protected override string GetItemFileName(IUmbracoEntity item, bool useGuid) if (item is IMediaType mediaType) { - return mediaType.Alias.ToSafeFileName(); + return mediaType.Alias.ToSafeFileName(shortStringHelper); } - return item.Name.ToSafeFileName(); + return item.Name.ToSafeFileName(shortStringHelper); } @@ -97,5 +84,12 @@ protected override void DeleteFolder(int id) protected override string GetItemAlias(IMediaType item) => item.Alias; + + protected override IEntity GetContainer(int id) + => mediaTypeService.GetContainer(id); + + protected override IEntity GetContainer(Guid key) + => mediaTypeService.GetContainer(key); + } } diff --git a/uSync8.BackOffice/SyncHandlers/Handlers/MemberTypeHandler.cs b/uSync.BackOffice/SyncHandlers/Handlers/MemberTypeHandler.cs similarity index 66% rename from uSync8.BackOffice/SyncHandlers/Handlers/MemberTypeHandler.cs rename to uSync.BackOffice/SyncHandlers/Handlers/MemberTypeHandler.cs index c280dde1..bd17fa79 100644 --- a/uSync8.BackOffice/SyncHandlers/Handlers/MemberTypeHandler.cs +++ b/uSync.BackOffice/SyncHandlers/Handlers/MemberTypeHandler.cs @@ -7,17 +7,18 @@ using Umbraco.Core.Models.Entities; using Umbraco.Core.Services; using Umbraco.Core.Services.Implement; +using Umbraco.Core.Strings; -using uSync8.BackOffice.Configuration; -using uSync8.BackOffice.Services; -using uSync8.Core; -using uSync8.Core.Dependency; -using uSync8.Core.Serialization; -using uSync8.Core.Tracking; +using uSync.BackOffice.Configuration; +using uSync.BackOffice.Services; +using uSync.Core; +using uSync.Core.Dependency; +using uSync.Core.Serialization; +using uSync.Core.Tracking; using static Umbraco.Core.Constants; -namespace uSync8.BackOffice.SyncHandlers.Handlers +namespace uSync.BackOffice.SyncHandlers.Handlers { [SyncHandler("memberTypeHandler", "Member Types", "MemberTypes", uSyncBackOfficeConstants.Priorites.MemberTypes, IsTwoPass = true, Icon = "icon-users", EntityType = UdiEntityType.MemberType)] @@ -26,6 +27,7 @@ public class MemberTypeHandler : SyncHandlerContainerBase serializer, ISyncItemFactory syncItemFactory, SyncFileService syncFileService) - : base(entityService, logger, appCaches, serializer, syncItemFactory, syncFileService) + : base(shortStringHelper, entityService, logger, appCaches, serializer, syncItemFactory, syncFileService) { this.memberTypeService = memberTypeService; } - [Obsolete("Use constructors with collections")] - protected MemberTypeHandler( - IEntityService entityService, - IProfilingLogger logger, - IMemberTypeService memberTypeService, - ISyncSerializer serializer, - ISyncTracker tracker, - AppCaches appCaches, - ISyncDependencyChecker checker, - SyncFileService syncFileService) - : base(entityService, logger, serializer, tracker, appCaches, checker, syncFileService) - { - this.memberTypeService = memberTypeService; - - this.Enabled = false; - // turn it off it appears to break things in current build - } protected override void InitializeEvents(HandlerSettings settings) { MemberTypeService.Saved += EventSavedItem; @@ -80,16 +65,23 @@ protected override IMemberType GetFromService(Guid key) protected override IMemberType GetFromService(string alias) => memberTypeService.Get(alias); + + protected override IEntity GetContainer(int id) + => memberTypeService.GetContainer(id); + + protected override IEntity GetContainer(Guid key) + => memberTypeService.GetContainer(key); + protected override string GetItemFileName(IUmbracoEntity item, bool useGuid) { if (useGuid) return item.Key.ToString(); if (item is IMemberType memberType) { - return memberType.Alias.ToSafeFileName(); + return memberType.Alias.ToSafeFileName(shortStringHelper); } - return item.Name.ToSafeFileName(); + return item.Name.ToSafeFileName(shortStringHelper); } protected override string GetItemAlias(IMemberType item) diff --git a/uSync8.BackOffice/SyncHandlers/Handlers/TemplateHandler.cs b/uSync.BackOffice/SyncHandlers/Handlers/TemplateHandler.cs similarity index 71% rename from uSync8.BackOffice/SyncHandlers/Handlers/TemplateHandler.cs rename to uSync.BackOffice/SyncHandlers/Handlers/TemplateHandler.cs index 355e2820..b7e8348c 100644 --- a/uSync8.BackOffice/SyncHandlers/Handlers/TemplateHandler.cs +++ b/uSync.BackOffice/SyncHandlers/Handlers/TemplateHandler.cs @@ -9,17 +9,18 @@ using Umbraco.Core.Models.Entities; using Umbraco.Core.Services; using Umbraco.Core.Services.Implement; +using Umbraco.Core.Strings; -using uSync8.BackOffice.Configuration; -using uSync8.BackOffice.Services; -using uSync8.Core; -using uSync8.Core.Dependency; -using uSync8.Core.Serialization; -using uSync8.Core.Tracking; +using uSync.BackOffice.Configuration; +using uSync.BackOffice.Services; +using uSync.Core; +using uSync.Core.Dependency; +using uSync.Core.Serialization; +using uSync.Core.Tracking; using static Umbraco.Core.Constants; -namespace uSync8.BackOffice.SyncHandlers.Handlers +namespace uSync.BackOffice.SyncHandlers.Handlers { [SyncHandler("templateHandler", "Templates", "Templates", uSyncBackOfficeConstants.Priorites.Templates, Icon = "icon-layout", EntityType = UdiEntityType.Template, IsTwoPass = true)] @@ -28,6 +29,7 @@ public class TemplateHandler : SyncHandlerLevelBase, IS private readonly IFileService fileService; public TemplateHandler( + IShortStringHelper shortStringHelper, IFileService fileService, IEntityService entityService, IProfilingLogger logger, @@ -35,27 +37,10 @@ public TemplateHandler( ISyncSerializer serializer, ISyncItemFactory syncItemFactory, SyncFileService syncFileService) - : base(entityService, logger, appCaches, serializer, syncItemFactory, syncFileService) + : base(shortStringHelper, entityService, logger, appCaches, serializer, syncItemFactory, syncFileService) { this.fileService = fileService; } - - [Obsolete("Use constructors with collections")] - protected TemplateHandler( - IEntityService entityService, - IProfilingLogger logger, - IFileService fileService, - ISyncSerializer serializer, - ISyncTracker tracker, - AppCaches appCaches, - ISyncDependencyChecker checker, - SyncFileService syncFileService) - : base(entityService, logger, serializer, tracker, appCaches, checker, syncFileService) - { - this.fileService = fileService; - } - - protected override ITemplate GetFromService(int id) => fileService.GetTemplate(id); @@ -66,7 +51,7 @@ protected override void InitializeEvents(HandlerSettings settings) } protected override string GetItemPath(ITemplate item, bool useGuid, bool isFlat) - => useGuid ? item.Key.ToString() : item.Alias.ToSafeFileName(); + => useGuid ? item.Key.ToString() : item.Alias.ToSafeFileName(shortStringHelper); protected override ITemplate GetFromService(Guid key) => fileService.GetTemplate(key); diff --git a/uSync8.BackOffice/SyncHandlers/Interfaces/ISyncExtendedHandler.cs b/uSync.BackOffice/SyncHandlers/Interfaces/ISyncExtendedHandler.cs similarity index 97% rename from uSync8.BackOffice/SyncHandlers/Interfaces/ISyncExtendedHandler.cs rename to uSync.BackOffice/SyncHandlers/Interfaces/ISyncExtendedHandler.cs index 922013d4..43bc35b2 100644 --- a/uSync8.BackOffice/SyncHandlers/Interfaces/ISyncExtendedHandler.cs +++ b/uSync.BackOffice/SyncHandlers/Interfaces/ISyncExtendedHandler.cs @@ -4,11 +4,11 @@ using Umbraco.Core; -using uSync8.BackOffice.Configuration; -using uSync8.Core.Dependency; -using uSync8.Core.Models; +using uSync.BackOffice.Configuration; +using uSync.Core.Dependency; +using uSync.Core.Models; -namespace uSync8.BackOffice.SyncHandlers +namespace uSync.BackOffice.SyncHandlers { /// /// A Extended Handler, lets you do things to just one item, diff --git a/uSync8.BackOffice/SyncHandlers/Interfaces/ISyncHandler.cs b/uSync.BackOffice/SyncHandlers/Interfaces/ISyncHandler.cs similarity index 97% rename from uSync8.BackOffice/SyncHandlers/Interfaces/ISyncHandler.cs rename to uSync.BackOffice/SyncHandlers/Interfaces/ISyncHandler.cs index 1de1fddd..ce607284 100644 --- a/uSync8.BackOffice/SyncHandlers/Interfaces/ISyncHandler.cs +++ b/uSync.BackOffice/SyncHandlers/Interfaces/ISyncHandler.cs @@ -1,9 +1,9 @@ using System; using System.Collections.Generic; -using uSync8.BackOffice.Configuration; +using uSync.BackOffice.Configuration; -namespace uSync8.BackOffice.SyncHandlers +namespace uSync.BackOffice.SyncHandlers { public delegate void SyncUpdateCallback(string message, int count, int total); diff --git a/uSync8.BackOffice/SyncHandlers/Interfaces/ISyncPostImportHanlder.cs b/uSync.BackOffice/SyncHandlers/Interfaces/ISyncPostImportHanlder.cs similarity index 94% rename from uSync8.BackOffice/SyncHandlers/Interfaces/ISyncPostImportHanlder.cs rename to uSync.BackOffice/SyncHandlers/Interfaces/ISyncPostImportHanlder.cs index dceab9a1..9dc8aad1 100644 --- a/uSync8.BackOffice/SyncHandlers/Interfaces/ISyncPostImportHanlder.cs +++ b/uSync.BackOffice/SyncHandlers/Interfaces/ISyncPostImportHanlder.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; -using uSync8.BackOffice.Configuration; +using uSync.BackOffice.Configuration; -namespace uSync8.BackOffice.SyncHandlers +namespace uSync.BackOffice.SyncHandlers { /// /// handlers that also need to be called at the end (when everything has been processed) diff --git a/uSync8.BackOffice/SyncHandlers/Models/ExtendedHandlerConfigPair.cs b/uSync.BackOffice/SyncHandlers/Models/ExtendedHandlerConfigPair.cs similarity index 87% rename from uSync8.BackOffice/SyncHandlers/Models/ExtendedHandlerConfigPair.cs rename to uSync.BackOffice/SyncHandlers/Models/ExtendedHandlerConfigPair.cs index 5ee8e4bc..76034434 100644 --- a/uSync8.BackOffice/SyncHandlers/Models/ExtendedHandlerConfigPair.cs +++ b/uSync.BackOffice/SyncHandlers/Models/ExtendedHandlerConfigPair.cs @@ -1,9 +1,9 @@ using Newtonsoft.Json; using Newtonsoft.Json.Serialization; -using uSync8.BackOffice.Configuration; +using uSync.BackOffice.Configuration; -namespace uSync8.BackOffice.SyncHandlers +namespace uSync.BackOffice.SyncHandlers { /// /// Handler and Handler Config Object diff --git a/uSync8.BackOffice/SyncHandlers/Models/HandlerActionNames.cs b/uSync.BackOffice/SyncHandlers/Models/HandlerActionNames.cs similarity index 95% rename from uSync8.BackOffice/SyncHandlers/Models/HandlerActionNames.cs rename to uSync.BackOffice/SyncHandlers/Models/HandlerActionNames.cs index 3d489de9..6080eeba 100644 --- a/uSync8.BackOffice/SyncHandlers/Models/HandlerActionNames.cs +++ b/uSync.BackOffice/SyncHandlers/Models/HandlerActionNames.cs @@ -1,6 +1,6 @@ using System; -namespace uSync8.BackOffice.SyncHandlers +namespace uSync.BackOffice.SyncHandlers { /// /// Possible actions a handler can do (stored in config) diff --git a/uSync8.BackOffice/SyncHandlers/Models/HandlerConfigPair.cs b/uSync.BackOffice/SyncHandlers/Models/HandlerConfigPair.cs similarity index 74% rename from uSync8.BackOffice/SyncHandlers/Models/HandlerConfigPair.cs rename to uSync.BackOffice/SyncHandlers/Models/HandlerConfigPair.cs index 49700ae4..e838335f 100644 --- a/uSync8.BackOffice/SyncHandlers/Models/HandlerConfigPair.cs +++ b/uSync.BackOffice/SyncHandlers/Models/HandlerConfigPair.cs @@ -1,8 +1,8 @@ using System; -using uSync8.BackOffice.Configuration; +using uSync.BackOffice.Configuration; -namespace uSync8.BackOffice.SyncHandlers +namespace uSync.BackOffice.SyncHandlers { [Obsolete("Extended Handler Config gives better results")] public class HandlerConfigPair diff --git a/uSync8.BackOffice/SyncHandlers/Models/SyncHandlerAttribute.cs b/uSync.BackOffice/SyncHandlers/Models/SyncHandlerAttribute.cs similarity index 97% rename from uSync8.BackOffice/SyncHandlers/Models/SyncHandlerAttribute.cs rename to uSync.BackOffice/SyncHandlers/Models/SyncHandlerAttribute.cs index 7b915a60..40fd9aa1 100644 --- a/uSync8.BackOffice/SyncHandlers/Models/SyncHandlerAttribute.cs +++ b/uSync.BackOffice/SyncHandlers/Models/SyncHandlerAttribute.cs @@ -1,6 +1,6 @@ using System; -namespace uSync8.BackOffice.SyncHandlers +namespace uSync.BackOffice.SyncHandlers { /// /// Attribute used to markup a handler in code. diff --git a/uSync8.BackOffice/SyncHandlers/Models/SyncHandlerOptions.cs b/uSync.BackOffice/SyncHandlers/Models/SyncHandlerOptions.cs similarity index 96% rename from uSync8.BackOffice/SyncHandlers/Models/SyncHandlerOptions.cs rename to uSync.BackOffice/SyncHandlers/Models/SyncHandlerOptions.cs index ab7f490b..4182416e 100644 --- a/uSync8.BackOffice/SyncHandlers/Models/SyncHandlerOptions.cs +++ b/uSync.BackOffice/SyncHandlers/Models/SyncHandlerOptions.cs @@ -1,7 +1,7 @@ using Newtonsoft.Json; using Newtonsoft.Json.Serialization; -namespace uSync8.BackOffice.SyncHandlers +namespace uSync.BackOffice.SyncHandlers { [JsonObject(NamingStrategyType = typeof(DefaultNamingStrategy))] /// diff --git a/uSync8.BackOffice/SyncHandlers/SyncHandlerBase.cs b/uSync.BackOffice/SyncHandlers/SyncHandlerBase.cs similarity index 74% rename from uSync8.BackOffice/SyncHandlers/SyncHandlerBase.cs rename to uSync.BackOffice/SyncHandlers/SyncHandlerBase.cs index 8c970e7b..edc589eb 100644 --- a/uSync8.BackOffice/SyncHandlers/SyncHandlerBase.cs +++ b/uSync.BackOffice/SyncHandlers/SyncHandlerBase.cs @@ -1,7 +1,8 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Web; + +using Microsoft.AspNetCore.Razor.TagHelpers; using Umbraco.Core; using Umbraco.Core.Cache; @@ -9,16 +10,17 @@ using Umbraco.Core.Models; using Umbraco.Core.Models.Entities; using Umbraco.Core.Services; +using Umbraco.Core.Strings; -using uSync8.BackOffice.Configuration; -using uSync8.BackOffice.Services; -using uSync8.Core; -using uSync8.Core.Dependency; -using uSync8.Core.Models; -using uSync8.Core.Serialization; -using uSync8.Core.Tracking; +using uSync.BackOffice.Configuration; +using uSync.BackOffice.Services; +using uSync.Core; +using uSync.Core.Dependency; +using uSync.Core.Models; +using uSync.Core.Serialization; +using uSync.Core.Tracking; -namespace uSync8.BackOffice.SyncHandlers +namespace uSync.BackOffice.SyncHandlers { public abstract class SyncHandlerBase : SyncHandlerRoot @@ -29,8 +31,10 @@ public abstract class SyncHandlerBase protected readonly IEntityService entityService; + protected readonly IShortStringHelper shortStringHelper; public SyncHandlerBase( + IShortStringHelper shortStringHelper, IEntityService entityService, IProfilingLogger logger, AppCaches appCaches, @@ -40,38 +44,8 @@ public SyncHandlerBase( : base(logger, appCaches, serializer, syncItemFactory, syncFileService) { this.entityService = entityService; + this.shortStringHelper = shortStringHelper; } - - - [Obsolete("Use constructors with collections")] - public SyncHandlerBase( - IEntityService entityService, - IProfilingLogger logger, - ISyncSerializer serializer, - ISyncTracker tracker, - AppCaches appCaches, - SyncFileService syncFileService) - : this(entityService, logger, serializer, tracker, appCaches, null, syncFileService) { } - - - [Obsolete("Use constructors with collections")] - public SyncHandlerBase( - IEntityService entityService, - IProfilingLogger logger, - ISyncSerializer serializer, - ISyncTracker tracker, - AppCaches appCaches, - ISyncDependencyChecker dependencyChecker, - SyncFileService syncFileService) - : base(logger, appCaches, - serializer, - tracker.AsEnumerableOfOne(), - dependencyChecker.AsEnumerableOfOne(), - syncFileService) - { - this.entityService = entityService; - } - protected override IEnumerable DeleteMissingItems(TObject parent, IEnumerable keys, bool reportOnly) { var items = GetChildItems(parent.Id).ToList(); diff --git a/uSync8.BackOffice/SyncHandlers/SyncHandlerCollectionBuilder.cs b/uSync.BackOffice/SyncHandlers/SyncHandlerCollectionBuilder.cs similarity index 96% rename from uSync8.BackOffice/SyncHandlers/SyncHandlerCollectionBuilder.cs rename to uSync.BackOffice/SyncHandlers/SyncHandlerCollectionBuilder.cs index 6357cd18..c464bd6a 100644 --- a/uSync8.BackOffice/SyncHandlers/SyncHandlerCollectionBuilder.cs +++ b/uSync.BackOffice/SyncHandlers/SyncHandlerCollectionBuilder.cs @@ -5,9 +5,9 @@ using Umbraco.Core; using Umbraco.Core.Composing; -using uSync8.BackOffice.Configuration; +using uSync.BackOffice.Configuration; -namespace uSync8.BackOffice.SyncHandlers +namespace uSync.BackOffice.SyncHandlers { public class SyncHandlerCollectionBuilder : LazyCollectionBuilderBase diff --git a/uSync8.BackOffice/SyncHandlers/SyncHandlerContainerBase.cs b/uSync.BackOffice/SyncHandlers/SyncHandlerContainerBase.cs similarity index 75% rename from uSync8.BackOffice/SyncHandlers/SyncHandlerContainerBase.cs rename to uSync.BackOffice/SyncHandlers/SyncHandlerContainerBase.cs index 6e65114e..47bbb6ba 100644 --- a/uSync8.BackOffice/SyncHandlers/SyncHandlerContainerBase.cs +++ b/uSync.BackOffice/SyncHandlers/SyncHandlerContainerBase.cs @@ -9,15 +9,16 @@ using Umbraco.Core.Models; using Umbraco.Core.Models.Entities; using Umbraco.Core.Services; +using Umbraco.Core.Strings; -using uSync8.BackOffice.Configuration; -using uSync8.BackOffice.Services; -using uSync8.Core; -using uSync8.Core.Dependency; -using uSync8.Core.Serialization; -using uSync8.Core.Tracking; +using uSync.BackOffice.Configuration; +using uSync.BackOffice.Services; +using uSync.Core; +using uSync.Core.Dependency; +using uSync.Core.Serialization; +using uSync.Core.Tracking; -namespace uSync8.BackOffice.SyncHandlers +namespace uSync.BackOffice.SyncHandlers { /// /// Base hanlder for objects that have container based trees @@ -39,39 +40,16 @@ public abstract class SyncHandlerContainerBase { protected SyncHandlerContainerBase( + IShortStringHelper shortStringHelper, IEntityService entityService, IProfilingLogger logger, AppCaches appCaches, ISyncSerializer serializer, ISyncItemFactory syncItemFactory, SyncFileService syncFileService) - : base(entityService, logger, appCaches, serializer, syncItemFactory, syncFileService) + : base(shortStringHelper, entityService, logger, appCaches, serializer, syncItemFactory, syncFileService) { } - [Obsolete("Use constructors with collections")] - protected SyncHandlerContainerBase( - IEntityService entityService, - IProfilingLogger logger, - ISyncSerializer serializer, - ISyncTracker tracker, - AppCaches appCaches, - SyncFileService syncFileService) - : base(entityService, logger, serializer, tracker, appCaches, syncFileService) - { } - - [Obsolete("Use constructors with collections")] - protected SyncHandlerContainerBase( - IEntityService entityService, - IProfilingLogger logger, - ISyncSerializer serializer, - ISyncTracker tracker, - AppCaches appCaches, - ISyncDependencyChecker checker, - SyncFileService syncFileService) - : base(entityService, logger, serializer, tracker, appCaches, checker, syncFileService) - { - } - protected IEnumerable CleanFolders(string folder, int parent) { var actions = new List(); @@ -149,7 +127,7 @@ protected IEnumerable UpdateFolder(int folderId, string folder, Han protected void EventContainerSaved(IService service, SaveEventArgs e) { - if (uSync8BackOffice.eventsPaused) return; + if (uSyncBackOffice.eventsPaused) return; foreach (var folder in e.SavedEntities) { diff --git a/uSync8.BackOffice/SyncHandlers/SyncHandlerFactory.cs b/uSync.BackOffice/SyncHandlers/SyncHandlerFactory.cs similarity index 94% rename from uSync8.BackOffice/SyncHandlers/SyncHandlerFactory.cs rename to uSync.BackOffice/SyncHandlers/SyncHandlerFactory.cs index 15184a09..ed23b012 100644 --- a/uSync8.BackOffice/SyncHandlers/SyncHandlerFactory.cs +++ b/uSync.BackOffice/SyncHandlers/SyncHandlerFactory.cs @@ -4,9 +4,9 @@ using Umbraco.Core; using Umbraco.Core.Logging; -using uSync8.BackOffice.Configuration; +using uSync.BackOffice.Configuration; -namespace uSync8.BackOffice.SyncHandlers +namespace uSync.BackOffice.SyncHandlers { public class SyncHandlerFactory { @@ -162,8 +162,11 @@ public IEnumerable GetValidHandlers(SyncHandlerOption }); } else - { - logger.Warn("No Handler with {alias} has been loaded", settings.Alias); + { + // only log if we are doing the default 'everything' group + // because weh nfoing groups we choose not to load things. + if (string.IsNullOrWhiteSpace(options.Group)) + logger.Warn("No Handler with {alias} has been loaded", settings.Alias); } } diff --git a/uSync8.BackOffice/SyncHandlers/SyncHandlerLevelBase.cs b/uSync.BackOffice/SyncHandlers/SyncHandlerLevelBase.cs similarity index 84% rename from uSync8.BackOffice/SyncHandlers/SyncHandlerLevelBase.cs rename to uSync.BackOffice/SyncHandlers/SyncHandlerLevelBase.cs index 1feac876..7fcdd9fa 100644 --- a/uSync8.BackOffice/SyncHandlers/SyncHandlerLevelBase.cs +++ b/uSync.BackOffice/SyncHandlers/SyncHandlerLevelBase.cs @@ -10,17 +10,18 @@ using Umbraco.Core.Logging; using Umbraco.Core.Models.Entities; using Umbraco.Core.Services; - -using uSync8.BackOffice.Configuration; -using uSync8.BackOffice.Services; -using uSync8.Core; -using uSync8.Core.Dependency; -using uSync8.Core.Extensions; -using uSync8.Core.Models; -using uSync8.Core.Serialization; -using uSync8.Core.Tracking; - -namespace uSync8.BackOffice.SyncHandlers +using Umbraco.Core.Strings; + +using uSync.BackOffice.Configuration; +using uSync.BackOffice.Services; +using uSync.Core; +using uSync.Core.Dependency; +using uSync.Core.Extensions; +using uSync.Core.Models; +using uSync.Core.Serialization; +using uSync.Core.Tracking; + +namespace uSync.BackOffice.SyncHandlers { /// /// SyncHandler for things that have a level, @@ -35,37 +36,14 @@ public abstract class SyncHandlerLevelBase { protected SyncHandlerLevelBase( + IShortStringHelper shortStringHelper, IEntityService entityService, IProfilingLogger logger, AppCaches appCaches, ISyncSerializer serializer, ISyncItemFactory syncItemFactory, SyncFileService syncFileService) - : base(entityService, logger, appCaches, serializer, syncItemFactory, syncFileService) - { } - - - [Obsolete("Use constructors with collections")] - protected SyncHandlerLevelBase( - IEntityService entityService, - IProfilingLogger logger, - ISyncSerializer serializer, - ISyncTracker tracker, - AppCaches appCaches, - SyncFileService syncFileService) - : base(entityService, logger, serializer, tracker, appCaches, syncFileService) - { } - - [Obsolete("Use constructors with collections")] - protected SyncHandlerLevelBase( - IEntityService entityService, - IProfilingLogger logger, - ISyncSerializer serializer, - ISyncTracker tracker, - AppCaches appCaches, - ISyncDependencyChecker checker, - SyncFileService syncFileService) - : base(entityService, logger, serializer, tracker, appCaches, checker, syncFileService) + : base(shortStringHelper, entityService, logger, appCaches, serializer, syncItemFactory, syncFileService) { } /// @@ -209,7 +187,7 @@ virtual protected string GetItemFileName(IUmbracoEntity item, bool useGuid) if (useGuid) return item.Key.ToString(); - return item.Name.ToSafeFileName(); + return item.Name.ToSafeFileName(shortStringHelper); } return Guid.NewGuid().ToString(); diff --git a/uSync8.BackOffice/SyncHandlers/SyncHandlerRoot.cs b/uSync.BackOffice/SyncHandlers/SyncHandlerRoot.cs similarity index 87% rename from uSync8.BackOffice/SyncHandlers/SyncHandlerRoot.cs rename to uSync.BackOffice/SyncHandlers/SyncHandlerRoot.cs index 07b777ba..fc5b53ce 100644 --- a/uSync8.BackOffice/SyncHandlers/SyncHandlerRoot.cs +++ b/uSync.BackOffice/SyncHandlers/SyncHandlerRoot.cs @@ -1,30 +1,29 @@ using System; using System.Collections.Generic; -using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Threading; using System.Xml.Linq; +using Umbraco.Composing; using Umbraco.Core; using Umbraco.Core.Cache; -using Umbraco.Core.Composing; using Umbraco.Core.Events; using Umbraco.Core.Logging; using Umbraco.Core.Models; using Umbraco.Core.Services; -using uSync8.BackOffice.Configuration; -using uSync8.BackOffice.Services; -using uSync8.Core; -using uSync8.Core.Dependency; -using uSync8.Core.Extensions; -using uSync8.Core.Models; -using uSync8.Core.Serialization; -using uSync8.Core.Tracking; +using uSync.BackOffice.Configuration; +using uSync.BackOffice.Services; +using uSync.Core; +using uSync.Core.Dependency; +using uSync.Core.Extensions; +using uSync.Core.Models; +using uSync.Core.Serialization; +using uSync.Core.Tracking; -namespace uSync8.BackOffice.SyncHandlers +namespace uSync.BackOffice.SyncHandlers { public abstract class SyncHandlerRoot { @@ -117,17 +116,6 @@ public abstract class SyncHandlerRoot protected readonly ISyncItemFactory itemFactory; - [Obsolete("Use constructors with collections")] - protected SyncHandlerRoot( - IProfilingLogger logger, - AppCaches appCaches, - ISyncSerializer serializer, - IEnumerable> trackers, - IEnumerable> checkers, - SyncFileService syncFileService) - : this(logger, appCaches, serializer, null, syncFileService) - { } - public SyncHandlerRoot( IProfilingLogger logger, AppCaches appCaches, @@ -136,8 +124,9 @@ public SyncHandlerRoot( SyncFileService syncFileService) { this.logger = logger; - this.itemFactory = itemFactory ?? Current.Factory.GetInstance(); + this.itemFactory = itemFactory; //TODO: no longer a null go get it from the current option? + this.serializer = serializer; this.trackers = this.itemFactory.GetTrackers().ToList(); this.dependencyCheckers = this.itemFactory.GetCheckers().ToList(); @@ -175,7 +164,6 @@ public SyncHandlerRoot( logger.Info(handlerType, "No caching of handler key lookups (CacheFolderKeys = false)"); this.runtimeCache = NoAppCache.Instance; } - } private void GetDefaultConfig(uSyncSettings setting) @@ -204,35 +192,40 @@ private void BackOfficeConfig_Reloaded(uSyncSettings settings) } #region Importing + + /// + /// Import everything from a given folder, using the supplied config settings. + /// public IEnumerable ImportAll(string folder, HandlerSettings config, bool force, SyncUpdateCallback callback = null) { - var sw = Stopwatch.StartNew(); - logger.Debug(handlerType, "{alias} ImportAll: {fileName}", this.Alias, Path.GetFileName(folder)); - - var actions = new List(); - var updates = new Dictionary(); + using (logger.DebugDuration(handlerType, $"Importing {Alias} {Path.GetFileName(folder)}", $"Import complete {Alias}")) + { + var actions = new List(); + var updates = new Dictionary(); - var cacheKey = GetCacheKeyBase(); + var cacheKey = GetCacheKeyBase(); - logger.Debug(handlerType, "Clearing Key Cache for {Alias} [{key}]", this.Alias, cacheKey); - runtimeCache.ClearByKey(cacheKey); + logger.Debug(handlerType, "Clearing KeyCache {key}", cacheKey); + runtimeCache.ClearByKey(cacheKey); - actions.AddRange(ImportFolder(folder, config, updates, force, callback)); + actions.AddRange(ImportFolder(folder, config, updates, force, callback)); - if (updates.Count > 0) - { - PerformSecondPassImports(updates, actions, config, callback); - } + if (updates.Count > 0) + { + PerformSecondPassImports(updates, actions, config, callback); + } - logger.Debug(handlerType, "Clearing Key Cache for {Alias} [{key}]", this.Alias, cacheKey); - runtimeCache.ClearByKey(cacheKey); - callback?.Invoke("Done", 3, 3); + logger.Debug(handlerType, "Clearing KeyCache {key}", cacheKey); + runtimeCache.ClearByKey(cacheKey); + callback?.Invoke("Done", 3, 3); - sw.Stop(); - logger.Debug(handlerType, "{alias} Import Complete {elapsedMilliseconds}ms", this.Alias, sw.ElapsedMilliseconds); - return actions; + return actions; + } } + /// + /// Import everything in a given (child) folder, based on setting + /// protected virtual IEnumerable ImportFolder(string folder, HandlerSettings config, Dictionary updates, bool force, SyncUpdateCallback callback) { List actions = new List(); @@ -287,9 +280,6 @@ protected virtual IEnumerable ImportFolder(string folder, HandlerSe if (actions.All(x => x.Success) && cleanMarkers.Count > 0) { - // this is just extra messaging, given how quickly the next message will be sent. - // callback?.Invoke("Cleaning Folders", 1, cleanMarkers.Count); - foreach (var item in cleanMarkers.Select((filePath, Index) => new { filePath, Index })) { var folderName = Path.GetFileName(item.filePath); @@ -313,6 +303,9 @@ protected virtual IEnumerable ImportFolder(string folder, HandlerSe return actions; } + /// + /// Import a single item, from the .config file supplied + /// public virtual SyncAttempt Import(string filePath, HandlerSettings config, SerializerFlags flags) { try @@ -330,7 +323,8 @@ public virtual SyncAttempt Import(string filePath, HandlerSettings conf } else { - return SyncAttempt.Succeed(Path.GetFileName(filePath), default(TObject), ChangeType.NoChange, "Not Imported (Based on config)"); + return SyncAttempt.Succeed(Path.GetFileName(filePath), + ChangeType.NoChange, "Not Imported (Based on config)"); } } } @@ -361,7 +355,6 @@ private void PerformSecondPassImports(IDictionary updates, List { if (actions.Any(x => x.FileName == item.update.Key)) { - var action = actions.FirstOrDefault(x => x.FileName == item.update.Key); actions.Remove(action); action.Message += attempt.Message; @@ -369,6 +362,25 @@ private void PerformSecondPassImports(IDictionary updates, List } } + // If the second attemt has change details add them to the first attempt + if (attempt.Details != null && attempt.Details.Any()) + { + if (actions.Any(x => x.FileName == item.update.Key)) + { + var action = actions.FirstOrDefault(x => x.FileName == item.update.Key); + + var details = new List(); + if (action.Details != null) + { + details.AddRange(action.Details); + } + details.AddRange(attempt.Details); + actions.Remove(action); + action.Details = details; + actions.Add(action); + } + } + if (attempt.Change > ChangeType.NoChange && !attempt.Saved && attempt.Item != null) { serializer.Save(attempt.Item.AsEnumerableOfOne()); @@ -390,6 +402,9 @@ private void PerformSecondPassImports(IDictionary updates, List } } + /// + /// Perform a 'second pass' import on a single item. + /// virtual public SyncAttempt ImportSecondPass(string file, TObject item, HandlerSettings config, SyncUpdateCallback callback) { if (IsTwoPass) @@ -440,9 +455,8 @@ protected virtual IEnumerable CleanFolder(string cleanFile, bool re // even if the folder is wrong // be a little slower (not much though) - // we cache this, (it is cleared at the end of ImportAll/ReportAll) + // we cache this, (it is cleared on an ImportAll) var keys = GetFolderKeys(folder, flat); - if (keys.Count > 0) { // keys should aways have at least one entry (the key from cleanFile) @@ -451,7 +465,7 @@ protected virtual IEnumerable CleanFolder(string cleanFile, bool re // we only then do deletes when we know we have loaded some keys! return DeleteMissingItems(parent, keys, reportOnly); } - else + else { logger.Warn(handlerType, "Failed to get the keys for items in the folder, there might be a disk issue {folder}", folder); return Enumerable.Empty(); @@ -472,7 +486,7 @@ private IList GetFolderKeys(string folder, bool flat) var folderKey = folder.GetHashCode(); var cacheKey = $"{GetCacheKeyBase()}_{folderKey}"; - var result = runtimeCache.GetCacheItem(cacheKey, () => + return runtimeCache.GetCacheItem(cacheKey, () => { var keys = new List(); var files = syncFileService.GetFiles(folder, "*.config"); @@ -484,14 +498,9 @@ private IList GetFolderKeys(string folder, bool flat) keys.Add(key); } - logger.Debug(handlerType, "Adding {count} keys to {key}", keys.Count, cacheKey); return keys; }, null); - - logger.Debug(handlerType, "Returning {count} keys from {folder}", result.Count, folder); - - return result; } /// @@ -569,7 +578,6 @@ virtual public IEnumerable ExportAll(TContainer parent, string fold actions.AddRange(ExportAll(item.Value, folder, config, callback)); } - // callback?.Invoke("Done", 1, 1); return actions; } @@ -613,7 +621,6 @@ public IEnumerable Report(string folder, HandlerSettings config, Sy var cacheKey = GetCacheKeyBase(); - logger.Debug(handlerType, "Clearing Key Cache for {Alias} [{key}]", this.Alias, cacheKey); runtimeCache.ClearByKey(cacheKey); callback?.Invoke("Checking Actions", 1, 3); @@ -622,16 +629,12 @@ public IEnumerable Report(string folder, HandlerSettings config, Sy callback?.Invoke("Validating Report", 2, 3); actions = ValidateReport(folder, actions); - logger.Debug(handlerType, "Clearing Key Cache for {Alias} [{key}]", this.Alias, cacheKey); runtimeCache.ClearByKey(cacheKey); callback?.Invoke("Done", 3, 3); return actions; } - private string GetCacheKeyBase() - => $"keycache_{this.Alias}_{Thread.CurrentThread.ManagedThreadId}"; - private List ValidateReport(string folder, List actions) { // Alters the existing list, by chaning the type as needed. @@ -666,24 +669,23 @@ protected virtual IEnumerable ReportDeleteCheck(string folder, IEnu var details = new List(); // add the delete message to the list of changes - details.Add(new uSyncChange() - { - Change = ChangeDetailType.Delete, - Name = $"Delete: {deleteAction.Name} ({Path.GetFileName(deleteAction.FileName)})", - NewValue = deleteAction.FileName.Substring(folder.Length), - Path = Path.GetFileName(deleteAction.FileName) - }); + var filename = Path.GetFileName(deleteAction.FileName); + var relativePath = deleteAction.FileName.Substring(folder.Length); + + details.Add(uSyncChange.Delete(filename, $"Delete: {deleteAction.Name} ({filename}", relativePath)); // add all the duplicates to the list of changes. foreach (var dup in actions.Where(x => x.Change != ChangeType.Delete && DoActionsMatch(x, deleteAction))) { - details.Add(new uSyncChange() - { - Change = ChangeDetailType.Update, - Name = $"{dup.Change}: {dup.Name} ({Path.GetFileName(dup.FileName)})", - NewValue = dup.FileName.Substring(folder.Length), - Path = Path.GetFileName(dup.FileName) - }); + var dupFilename = Path.GetFileName(dup.FileName); + var dupRelativePath = dup.FileName.Substring(folder.Length); + + details.Add( + uSyncChange.Update( + path: dupFilename, + name: $"{dup.Change} : {dup.Name} ({dupFilename})", + oldValue: "", + newValue: dupRelativePath)); } duplicateAction.Details = details; @@ -816,7 +818,8 @@ protected virtual IEnumerable ReportElement(XElement node, string f action.Details = GetChanges(node,serializerOptions); if (action.Change != ChangeType.Create && (action.Details == null || action.Details.Count() == 0)) { - action.Message = "Change details not calculated"; + action.Message = "xml is diffrent - but properties may not have changed"; + action.Details = MakeRawChange(node, serializerOptions).AsEnumerableOfOne(); } else { @@ -839,6 +842,37 @@ protected virtual IEnumerable ReportElement(XElement node, string f } } + private uSyncChange MakeRawChange(XElement node, SyncSerializerOptions options) + { + var item = this.GetFromService(node.GetKey()); + var currentNode = GetCurrent(item, options); + if (currentNode.Success) + { + return uSyncChange.Update(node.GetAlias(), "Raw XML", currentNode.Item.ToString(), node.ToString()); + } + + return uSyncChange.NoChange(node.GetAlias(), node.GetAlias()); + + } + + + private SyncAttempt GetCurrent(TObject item, SyncSerializerOptions options) + { + if (item != null) + { + if (serializer is ISyncOptionsSerializer optionSerializer) + return optionSerializer.Serialize(item, options); + +#pragma warning disable CS0618 // Type or member is obsolete + return serializer.Serialize(item); +#pragma warning restore CS0618 // Type or member is obsolete + + } + + return SyncAttempt.Fail("unknown", ChangeType.Fail); + + } + protected IEnumerable ReportItem(string file, HandlerSettings config) { try @@ -871,9 +905,22 @@ private IEnumerable GetChanges(XElement node, SyncSerializerOptions #region Events - protected virtual void EventDeletedItem(IService sender, Umbraco.Core.Events.DeleteEventArgs e) + // + // Handling the events Umbraco fires for saves/deletes/etc, + // For most things these events are all handled the same way, so the root handler can copy with + // it. If the events need to be handled a diffrent way, then that is done inside the Handler + // by overriding the InitializeEvents method. + // + + /// + /// Method to setup the events for any given service/handler. + /// + protected abstract void InitializeEvents(HandlerSettings settings); + + + protected virtual void EventDeletedItem(IService sender, DeleteEventArgs e) { - if (uSync8BackOffice.eventsPaused) return; + if (uSyncBackOffice.eventsPaused) return; foreach (var item in e.DeletedEntities) { ExportDeletedItem(item, Path.Combine(rootFolder, this.DefaultFolder), DefaultConfig); @@ -882,7 +929,7 @@ protected virtual void EventDeletedItem(IService sender, Umbraco.Core.Events.Del protected virtual void EventSavedItem(IService sender, SaveEventArgs e) { - if (uSync8BackOffice.eventsPaused) return; + if (uSyncBackOffice.eventsPaused) return; foreach (var item in e.SavedEntities) { @@ -901,7 +948,7 @@ protected virtual void EventSavedItem(IService sender, SaveEventArgs e) protected virtual void EventMovedItem(IService sender, MoveEventArgs e) { - if (uSync8BackOffice.eventsPaused) return; + if (uSyncBackOffice.eventsPaused) return; foreach (var item in e.MoveInfoCollection) { @@ -995,6 +1042,9 @@ protected virtual void CleanUp(TObject item, string newFile, string folder) abstract protected TObject GetFromService(TContainer item); abstract protected void DeleteViaService(TObject item); + virtual protected TContainer GetContainer(Guid key) => default; + virtual protected TContainer GetContainer(int id) => default; + abstract protected string GetItemPath(TObject item, bool useGuid, bool isFlat); abstract protected string GetItemName(TObject item); @@ -1061,9 +1111,6 @@ virtual protected string CheckAndFixFileClash(string path, TObject item) protected virtual string GetXmlMatchString(XElement node) => node.GetAlias(); - - - /// /// Rename an item /// @@ -1081,9 +1128,6 @@ public void Initialize(HandlerSettings settings) InitializeEvents(settings); } - protected abstract void InitializeEvents(HandlerSettings settings); - - #region ISyncHandler2 Methods public virtual string Group { get; protected set; } = uSyncBackOfficeConstants.Groups.Settings; @@ -1152,8 +1196,25 @@ private TObject FindByUdi(Udi udi) } public IEnumerable GetDependencies(Guid key, DependencyFlags flags) { - var item = this.GetFromService(key); - return GetDependencies(item, flags); + if (key == Guid.Empty) + { + return GetContainerDependencies(default, flags); + } + else + { + var item = this.GetFromService(key); + if (item == null) + { + var container = this.GetContainer(key); + if (container != null) + { + return GetContainerDependencies(container, flags); + } + return Enumerable.Empty(); + } + + return GetDependencies(item, flags); + } } public IEnumerable GetDependencies(int id, DependencyFlags flags) @@ -1162,7 +1223,16 @@ public IEnumerable GetDependencies(int id, DependencyFlags flag if (id == -1) return GetContainerDependencies(default, flags); var item = this.GetFromService(id); - if (item == null) Enumerable.Empty(); + if (item == null) + { + var container = this.GetContainer(id); + if (container != null) + { + return GetContainerDependencies(container, flags); + } + + return Enumerable.Empty(); + } return GetDependencies(item, flags); } @@ -1260,5 +1330,9 @@ private ChangeType IsItemCurrent(XElement node, SyncSerializerOptions options) #endregion + + private string GetCacheKeyBase() + => $"keycache_{this.Alias}_{Thread.CurrentThread.ManagedThreadId}"; + } } diff --git a/uSync.BackOffice/SyncHandlers/SyncHandlerTreeBase.cs b/uSync.BackOffice/SyncHandlers/SyncHandlerTreeBase.cs new file mode 100644 index 00000000..8cdc73b8 --- /dev/null +++ b/uSync.BackOffice/SyncHandlers/SyncHandlerTreeBase.cs @@ -0,0 +1,44 @@ +using System; + +using Umbraco.Core.Cache; +using Umbraco.Core.Logging; +using Umbraco.Core.Models.Entities; +using Umbraco.Core.Services; +using Umbraco.Core.Strings; + +using uSync.BackOffice.Services; +using uSync.Core; +using uSync.Core.Dependency; +using uSync.Core.Serialization; +using uSync.Core.Tracking; + +namespace uSync.BackOffice.SyncHandlers +{ + /// + /// handlers that have a tree + /// + /// for flat processing these need to preload all the files, to workout what order + /// they go in, but that is ok because all treeSerializers store the level in the + /// top attribute. + /// + /// + /// + public abstract class SyncHandlerTreeBase : SyncHandlerLevelBase + where TObject : ITreeEntity + where TService : IService + { + protected SyncHandlerTreeBase( + IShortStringHelper shortStringHelper, + IEntityService entityService, + IProfilingLogger logger, + AppCaches appCaches, + ISyncSerializer serializer, + ISyncItemFactory syncItemFactory, + SyncFileService syncFileService) + : base(shortStringHelper, entityService, logger, appCaches, serializer, syncItemFactory, syncFileService) + { } + + protected override string GetItemName(TObject item) => item.Name; + } + +} diff --git a/uSync8.BackOffice/Targets/uSync.props b/uSync.BackOffice/Targets/uSync.props similarity index 100% rename from uSync8.BackOffice/Targets/uSync.props rename to uSync.BackOffice/Targets/uSync.props diff --git a/uSync8.BackOffice/Targets/uSync.targets b/uSync.BackOffice/Targets/uSync.targets similarity index 100% rename from uSync8.BackOffice/Targets/uSync.targets rename to uSync.BackOffice/Targets/uSync.targets diff --git a/uSync.BackOffice/uSync.BackOffice.csproj b/uSync.BackOffice/uSync.BackOffice.csproj new file mode 100644 index 00000000..c071f4c8 --- /dev/null +++ b/uSync.BackOffice/uSync.BackOffice.csproj @@ -0,0 +1,17 @@ + + + + netcoreapp3.1 + 9.0.0 + + + + + + + + + + + + diff --git a/uSync8.BackOffice/uSync8BackOffice.cs b/uSync.BackOffice/uSync8BackOffice.cs similarity index 86% rename from uSync8.BackOffice/uSync8BackOffice.cs rename to uSync.BackOffice/uSync8BackOffice.cs index 893b9d6b..8ee376ee 100644 --- a/uSync8.BackOffice/uSync8BackOffice.cs +++ b/uSync.BackOffice/uSync8BackOffice.cs @@ -1,6 +1,6 @@ -namespace uSync8.BackOffice +namespace uSync.BackOffice { - public class uSync8BackOffice + public class uSyncBackOffice { public static bool eventsPaused { get; set; } } diff --git a/uSync8.BackOffice/uSyncAction.cs b/uSync.BackOffice/uSyncAction.cs similarity index 86% rename from uSync8.BackOffice/uSyncAction.cs rename to uSync.BackOffice/uSyncAction.cs index 21dc6367..5cd78b17 100644 --- a/uSync8.BackOffice/uSyncAction.cs +++ b/uSync.BackOffice/uSyncAction.cs @@ -1,14 +1,16 @@ using System; using System.Collections.Generic; +using System.Linq; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Serialization; -using uSync8.Core; -using uSync8.Core.Models; +using uSync.BackOffice.Converters; +using uSync.Core; +using uSync.Core.Models; -namespace uSync8.BackOffice +namespace uSync.BackOffice { [JsonObject(NamingStrategyType = typeof(DefaultNamingStrategy))] @@ -17,10 +19,13 @@ public struct uSyncAction public string HandlerAlias { get; set; } public bool Success { get; set; } + + [System.Text.Json.Serialization.JsonConverter(typeof(JsonTypeConverter))] public Type ItemType { get; set; } public string Message { get; set; } public Exception Exception { get; set; } + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.JsonStringEnumConverter))] [JsonConverter(typeof(StringEnumConverter))] public ChangeType Change { get; set; } @@ -134,12 +139,22 @@ public struct uSyncActionHelper public static uSyncAction SetAction(SyncAttempt attempt, string filename, string handlerAlias, bool requirePostProcessing = true) { - return new uSyncAction(attempt.Success, attempt.Name, attempt.ItemType, attempt.Change, attempt.Message, attempt.Exception, filename, handlerAlias, requirePostProcessing); + var action = new uSyncAction(attempt.Success, attempt.Name, attempt.ItemType, attempt.Change, attempt.Message, attempt.Exception, filename, handlerAlias, requirePostProcessing); + if (attempt.Details != null && attempt.Details.Any()) + { + action.Details = attempt.Details; + } + return action; } public static uSyncAction SetAction(SyncAttempt attempt, string filename, bool requirePostProcessing = true) { - return new uSyncAction(attempt.Success, attempt.Name, attempt.ItemType, attempt.Change, attempt.Message, attempt.Exception, filename, requirePostProcessing); + var action = new uSyncAction(attempt.Success, attempt.Name, attempt.ItemType, attempt.Change, attempt.Message, attempt.Exception, filename, requirePostProcessing); + if (attempt.Details != null && attempt.Details.Any()) + { + action.Details = attempt.Details; + } + return action; } public static uSyncAction ReportAction(ChangeType changeType, string name) diff --git a/uSync8.BackOffice/uSyncBackOfficeComposer.cs b/uSync.BackOffice/uSyncBackOfficeComposer.cs similarity index 85% rename from uSync8.BackOffice/uSyncBackOfficeComposer.cs rename to uSync.BackOffice/uSyncBackOfficeComposer.cs index 00229198..bcd7652d 100644 --- a/uSync8.BackOffice/uSyncBackOfficeComposer.cs +++ b/uSync.BackOffice/uSyncBackOfficeComposer.cs @@ -1,12 +1,12 @@ using Umbraco.Core; using Umbraco.Core.Composing; -using uSync8.BackOffice.Configuration; -using uSync8.BackOffice.Services; -using uSync8.BackOffice.SyncHandlers; -using uSync8.Core; +using uSync.BackOffice.Configuration; +using uSync.BackOffice.Services; +using uSync.BackOffice.SyncHandlers; +using uSync.Core; -namespace uSync8.BackOffice +namespace uSync.BackOffice { [ComposeAfter(typeof(uSyncCoreComposer))] public class uSyncBackOfficeConfigComposer : IUserComposer diff --git a/uSync8.BackOffice/uSyncBackofficeComponent.cs b/uSync.BackOffice/uSyncBackofficeComponent.cs similarity index 87% rename from uSync8.BackOffice/uSyncBackofficeComponent.cs rename to uSync.BackOffice/uSyncBackofficeComponent.cs index 64f37eb8..5a982a00 100644 --- a/uSync8.BackOffice/uSyncBackofficeComponent.cs +++ b/uSync.BackOffice/uSyncBackofficeComponent.cs @@ -2,22 +2,22 @@ using System.Collections.Generic; using System.Diagnostics; using System.Linq; -using System.Web; -using System.Web.Mvc; -using System.Web.Routing; +using Microsoft.AspNetCore.Http; + +using Umbraco.Composing; using Umbraco.Core; using Umbraco.Core.Composing; using Umbraco.Core.Logging; +using Umbraco.Core.Sync; using Umbraco.Web; -using Umbraco.Web.JavaScript; +using Umbraco.Web.WebAssets; -using uSync8.BackOffice.Configuration; -using uSync8.BackOffice.Controllers; -using uSync8.BackOffice.Services; -using uSync8.BackOffice.SyncHandlers; +using uSync.BackOffice.Configuration; +using uSync.BackOffice.Services; +using uSync.BackOffice.SyncHandlers; -namespace uSync8.BackOffice +namespace uSync.BackOffice { public class uSyncBackofficeComponent : IComponent { @@ -28,6 +28,7 @@ public class uSyncBackofficeComponent : IComponent private readonly uSyncSettings globalSettings; private readonly uSyncService uSyncService; private readonly IRuntimeState runtimeState; + private readonly IServerRegistrar serverRegistrar; private readonly IUmbracoContextFactory umbracoContextFactory; @@ -37,6 +38,7 @@ public uSyncBackofficeComponent( SyncFileService fileService, uSyncService uSyncService, IRuntimeState runtimeState, + IServerRegistrar serverRegistrar, IUmbracoContextFactory umbracoContextFactory) { globalSettings = Current.Configs.uSync(); @@ -51,6 +53,7 @@ public uSyncBackofficeComponent( this.umbracoContextFactory = umbracoContextFactory; + this.serverRegistrar = serverRegistrar; } public void Initialize() @@ -63,7 +66,8 @@ public void Initialize() return; } - if (runtimeState.ServerRole == Umbraco.Core.Sync.ServerRole.Replica) + var role = serverRegistrar.GetCurrentServerRole(); + if (role == Umbraco.Core.Sync.ServerRole.Replica) { logger.Info("This is a replica server, uSync will not run any of the startup events"); return; @@ -78,6 +82,8 @@ public void Initialize() private void ServerVariablesParser_Parsing(object sender, Dictionary e) { + // TODO: this needs fixing - not sure how to get the URLHelper now? + /* if (HttpContext.Current == null) throw new InvalidOperationException("This method requires that an HttpContext be active"); @@ -87,6 +93,12 @@ private void ServerVariablesParser_Parsing(object sender, Dictionary(controller => controller.GetApi()) } }); + */ + + e.Add("uSync", new Dictionary + { + { "uSyncService", "/umbraco/backoffice/uSync/uSyncDashboardApi/" } + }); } private void InitBackOffice() diff --git a/uSync.Commands/Commands/InitCommand.cs b/uSync.Commands/Commands/InitCommand.cs deleted file mode 100644 index a6627dc8..00000000 --- a/uSync.Commands/Commands/InitCommand.cs +++ /dev/null @@ -1,271 +0,0 @@ -using System; -using System.Configuration; -using System.Data.SqlServerCe; -using System.IO; -using System.Linq; -using System.Threading.Tasks; -using System.Web.Security; -using System.Xml.Linq; -using Umbraco.Core; -using Umbraco.Core.Composing; -using Umbraco.Core.Configuration; -using Umbraco.Core.Exceptions; -using Umbraco.Core.IO; -using Umbraco.Core.Migrations.Install; -using Umbraco.Core.Services; -using uSync8.BackOffice.Commands; - -namespace uSync.BaseCommands -{ - /// - /// Installs umbraco, assuming you have the connection string setup. - /// - /// - /// this command will install umbraco, if the connection string is set, - /// if both the connection string and the version are set, but the database - /// isn't initlized then you get BootFailed. - /// - /// when that happens the install command will blank the version in the web.config - /// and then restart and try again. - /// - /// as the end it can also set the username/password combo (if passed on the command line) - /// - [SyncCommand("Init", "init", "Initilizes the umbraco installation, (as long the connection string is set)")] - public class InitCommand : SyncCommandBase, ISyncCommand - { - private readonly DatabaseBuilder databaseBuilder; - private readonly IGlobalSettings globalSettings; - private readonly IUserService userService; - - public InitCommand(TextReader reader, TextWriter writer, - DatabaseBuilder databaseBuilder, - IGlobalSettings globalSettings, - IUserService userService) : base(reader, writer) - { - this.databaseBuilder = databaseBuilder; - this.globalSettings = globalSettings; - this.userService = userService; - - AdvancedHelp = HelpTextResource.Init_Help; - } - - - public async Task Run(string[] args) - { - await writer.WriteLineAsync($" Umbraco is at level {Current.RuntimeState.Level}"); - - if (Current.RuntimeState.Level == RuntimeLevel.Run) - { - await writer.WriteLineAsync(" Umbraco is alread installed"); - return SyncCommandResult.NoResult; - } - - var connectionString = ConfigurationManager.ConnectionStrings[Constants.System.UmbracoConnectionName]; - if (connectionString == null || string.IsNullOrWhiteSpace(connectionString.ConnectionString)) - { - await writer.WriteLineAsync(" No connection string in config file"); - if (args.InvariantContains("-sqlce")) - { - await writer.WriteLineAsync(" Putting the basic SQL CE Connection string in. "); - SaveConnectionString(DatabaseBuilder.EmbeddedDatabaseConnectionString, Constants.DbProviderNames.SqlCe); - connectionString = new ConnectionStringSettings(Constants.System.UmbracoConnectionName, DatabaseBuilder.EmbeddedDatabaseConnectionString, Constants.DbProviderNames.SqlCe); - return SyncCommandResult.Restart; - } - else - { - await writer.WriteLineAsync(" you can use the -sqlce switch to have this value automatically populated"); - return SyncCommandResult.Error; - } - - } - - var result = SyncCommandResult.Success; - - if (connectionString.ProviderName.Equals("System.Data.SqlServerCe.4.0")) - { - // create the sql db file. - result = CreateSqlCEDb(connectionString.ConnectionString); - if (result != SyncCommandResult.Success) - return result; - } - - CreateDatabase(); - - var parameters = args.Where(x => !x.StartsWith("-")).ToArray(); - if (parameters.Length == 2) - { - result = SetupAdmin(parameters[0], parameters[1]); - } - - await writer.WriteLineAsync(" Setup complete !!! #h5yr\n"); - return result; - } - - - private SyncCommandResult CreateSqlCEDb(string connectionString) - { - var dataDirectory = (string)AppDomain.CurrentDomain.GetData("DataDirectory"); - - var parts = connectionString.Split(';'); - var dataSource = parts.FirstOrDefault(x => x.ToLower().Contains("data source")); - - if (string.IsNullOrWhiteSpace(dataSource)) - { - writer.WriteLine(" Data source value missing"); - return SyncCommandResult.Error; - } - - var fileName = dataSource.Split('=') - .Last() - .Split('\\') - .Last() - .Trim(); - - var path = Path.Combine(dataDirectory, fileName); - - if (!File.Exists(path)) - { - var engine = new SqlCeEngine(connectionString); - engine.CreateDatabase(); - writer.WriteLine(" Created SQL CE Database"); - } - - return SyncCommandResult.Success; - } - - private SyncCommandResult CreateDatabase() - { - writer.WriteLine(" Creating Database Schema"); - - var result = databaseBuilder.CreateSchemaAndData(); - if (!result.Success) - { - writer.WriteLine(" Failed to create db {0}", result.Message); - return SyncCommandResult.Error; - } - - if (globalSettings != null) - { - writer.WriteLine(" Setting Umbraco Version in config"); - globalSettings.ConfigurationStatus = UmbracoVersion.SemanticVersion.ToSemanticString(); - } - else - { - writer.WriteLine(" Global Settings, not set"); - } - - return result.Success ? SyncCommandResult.Restart : SyncCommandResult.Error; - } - - private SyncCommandResult SetupAdmin(string username, string password) - { - var admin = userService.GetUserById(Constants.Security.SuperUserId); - if (admin == null) - { - throw new InvalidOperationException(" Could not find the super user!"); - } - - writer.WriteLine(" Found super user - setting password "); - - var membershipUser = GetCurrentProvider().GetUser(Constants.Security.SuperUserId, true); - if (membershipUser == null) - { - throw new InvalidOperationException($" No user found in membership provider with id of {Constants.Security.SuperUserId}."); - } - - try - { - writer.WriteLine(" Setting password", password); - var success = membershipUser.ChangePassword("default", password); - if (success == false) - { - throw new FormatException(" Password must be at least " + GetCurrentProvider().MinRequiredPasswordLength + " characters long and contain at least " + GetCurrentProvider().MinRequiredNonAlphanumericCharacters + " symbols"); - } - } - catch (Exception ex) - { - writer.WriteLine(ex.ToString()); - // throw new FormatException(" Password must be at least " + CurrentProvider.MinRequiredPasswordLength + " characters long and contain at least " + CurrentProvider.MinRequiredNonAlphanumericCharacters + " symbols"); - } - - writer.WriteLine(" setting super user username - email -name"); - - admin.Email = username; - admin.Name = username; - admin.Username = username; - - writer.WriteLine(" Saving user"); - userService.Save(admin); - - return SyncCommandResult.Success; - } - - private MembershipProvider GetCurrentProvider() - { - var provider = Umbraco.Core.Security.MembershipProviderExtensions.GetUsersMembershipProvider(); - return provider; - } - - - private static void SaveConnectionString(string connectionString, string providerName) - { - if (string.IsNullOrWhiteSpace(connectionString)) throw new ArgumentNullOrEmptyException(nameof(connectionString)); - if (string.IsNullOrWhiteSpace(providerName)) throw new ArgumentNullOrEmptyException(nameof(providerName)); - - var fileSource = "web.config"; - var fileName = IOHelper.MapPath(SystemDirectories.Root + "/" + fileSource); - - var xml = XDocument.Load(fileName, LoadOptions.PreserveWhitespace); - if (xml.Root == null) throw new Exception($"Invalid {fileSource} file (no root)."); - - var connectionStrings = xml.Root.DescendantsAndSelf("connectionStrings").FirstOrDefault(); - if (connectionStrings == null) throw new Exception($"Invalid {fileSource} file (no connection strings)."); - - // handle configSource - var configSourceAttribute = connectionStrings.Attribute("configSource"); - if (configSourceAttribute != null) - { - fileSource = configSourceAttribute.Value; - fileName = IOHelper.MapPath(SystemDirectories.Root + "/" + fileSource); - - if (!File.Exists(fileName)) - throw new Exception($"Invalid configSource \"{fileSource}\" (no such file)."); - - xml = XDocument.Load(fileName, LoadOptions.PreserveWhitespace); - if (xml.Root == null) throw new Exception($"Invalid {fileSource} file (no root)."); - - connectionStrings = xml.Root.DescendantsAndSelf("connectionStrings").FirstOrDefault(); - if (connectionStrings == null) throw new Exception($"Invalid {fileSource} file (no connection strings)."); - } - - // create or update connection string - var setting = connectionStrings.Descendants("add").FirstOrDefault(s => s.Attribute("name")?.Value == Constants.System.UmbracoConnectionName); - if (setting == null) - { - connectionStrings.Add(new XElement("add", - new XAttribute("name", Constants.System.UmbracoConnectionName), - new XAttribute("connectionString", connectionString), - new XAttribute("providerName", providerName))); - } - else - { - AddOrUpdateAttribute(setting, "connectionString", connectionString); - AddOrUpdateAttribute(setting, "providerName", providerName); - } - - // save - xml.Save(fileName, SaveOptions.DisableFormatting); - } - - private static void AddOrUpdateAttribute(XElement element, string name, string value) - { - var attribute = element.Attribute(name); - if (attribute == null) - element.Add(new XAttribute(name, value)); - else - attribute.Value = value; - } - - - } -} diff --git a/uSync.Commands/Commands/LangCommand.cs b/uSync.Commands/Commands/LangCommand.cs deleted file mode 100644 index 4fa2966f..00000000 --- a/uSync.Commands/Commands/LangCommand.cs +++ /dev/null @@ -1,129 +0,0 @@ -using System; -using System.IO; -using System.Threading.Tasks; - -using Umbraco.Core.Models; -using Umbraco.Core.Services; - -using uSync8.BackOffice.Commands; - -namespace uSync.BaseCommands.Commands -{ - [SyncCommand("Lang", "lang", "Add/Remove languages")] - public class LangCommand : SyncCommandBase, ISyncCommand - { - private readonly ILocalizationService localizationService; - - public LangCommand(TextReader reader, TextWriter writer, - ILocalizationService localizationService) - : base(reader, writer) - { - this.localizationService = localizationService; - } - - public async Task Run(string[] args) - { - if (args.Length < 1) - { - await writer.WriteLineAsync("usage Lang add iso-code [iso-code]"); - return SyncCommandResult.NoResult; - } - - if (args.Length == 1 && args[0].Equals("list", StringComparison.InvariantCultureIgnoreCase)) - { - return await List(); - } - - if (args.Length > 1) { - - switch (args[0].ToLower()) - { - case "add": - return await AddLanguage(args[1]); - case "remove": - return await RemoveLanguage(args[1]); - case "default": - return await SetDefault(args[1]); - } - - } - - return SyncCommandResult.NoResult; - } - - private async Task AddLanguage(string isoCode) - { - var existing = localizationService.GetLanguageByIsoCode(isoCode); - if (existing == null || existing.IsoCode != isoCode) - { - await writer.WriteLineAsync($"Adding Language {isoCode}"); - var lang = new Language(isoCode); - localizationService.Save(lang); - return SyncCommandResult.Success; - } - - await writer.WriteLineAsync($"Language {isoCode} aready exists"); - return SyncCommandResult.NoResult; - } - - private async Task RemoveLanguage(string isoCode) - { - var existing = localizationService.GetLanguageByIsoCode(isoCode); - if (existing != null && existing.IsoCode.Equals(isoCode, StringComparison.InvariantCultureIgnoreCase)) - { - await writer.WriteLineAsync($"Removing Language ${isoCode}"); - localizationService.Delete(existing); - return SyncCommandResult.Success; - } - - await writer.WriteLineAsync($"Language {isoCode} not installed"); - return SyncCommandResult.NoResult; - } - - private async Task SetDefault(string isoCode) - { - var existing = localizationService.GetLanguageByIsoCode(isoCode); - if (existing != null && existing.IsoCode.Equals(isoCode, StringComparison.InvariantCultureIgnoreCase)) - { - var defaultLangId = localizationService.GetDefaultLanguageId(); - if (defaultLangId.HasValue) - { - var defaultLang = localizationService.GetLanguageById(defaultLangId.Value); - if (defaultLang != null && !defaultLang.IsoCode.Equals(isoCode, StringComparison.InvariantCultureIgnoreCase)) - { - await writer.WriteLineAsync($"Unsetting {isoCode} as default"); - defaultLang.IsDefault = false; - } - } - - await writer.WriteLineAsync($"Setting {isoCode} as default"); - existing.IsDefault = true; - localizationService.Save(existing); - - return SyncCommandResult.Success; - } - - - await writer.WriteLineAsync($"Language {isoCode} not installed"); - return SyncCommandResult.NoResult; - - - } - - private async Task List() - { - var languages = localizationService.GetAllLanguages(); - - await writer.WriteLineAsync("Language\tDefault"); - await writer.WriteLineAsync("----------------------------"); - foreach(var lang in languages) - { - await writer.WriteLineAsync( - string.Format("- {0}\t\t{1}", lang.IsoCode, - lang.IsDefault ? " #" : "")); - } - - return SyncCommandResult.Success; - } - } -} diff --git a/uSync.Commands/Commands/QuitCommand.cs b/uSync.Commands/Commands/QuitCommand.cs deleted file mode 100644 index 4e3c6a3a..00000000 --- a/uSync.Commands/Commands/QuitCommand.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using uSync8.BackOffice.Commands; - -namespace uSync.BaseCommands -{ - [SyncCommand("Quit", "quit", "Exits uSync Command line")] - public class QuitCommand : SyncCommandBase, ISyncCommand - { - public QuitCommand(TextReader reader, TextWriter writer) - : base(reader, writer) - { - AdvancedHelp = HelpTextResource.Quit_Help; - } - - public async Task Run(string[] args) - { - await writer.WriteLineAsync("Exiting...\n"); - return SyncCommandResult.Complete; - } - - } -} diff --git a/uSync.Commands/HelpTextResource.Designer.cs b/uSync.Commands/HelpTextResource.Designer.cs deleted file mode 100644 index 750ac449..00000000 --- a/uSync.Commands/HelpTextResource.Designer.cs +++ /dev/null @@ -1,89 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace uSync.BaseCommands { - using System; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class HelpTextResource { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal HelpTextResource() { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("uSync.BaseCommands.HelpTextResource", typeof(HelpTextResource).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - /// - /// Looks up a localized string similar to usage: uSync Init [username] [password] [-sqlce] - /// - ///Initializes umbraco, based on current state and settings. - /// - /// If the database is missing or blank then init will initialize the database. - /// - /// If username and password are supplied, the super user account will be setup with those credentials. - /// - /// -sqlce if the DSN entry is blank create a SQLCE dabase in the app_data folder. - /// - internal static string Init_Help { - get { - return ResourceManager.GetString("Init.Help", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Exits the application. - /// - internal static string Quit_Help { - get { - return ResourceManager.GetString("Quit.Help", resourceCulture); - } - } - } -} diff --git a/uSync.Commands/HelpTextResource.resx b/uSync.Commands/HelpTextResource.resx deleted file mode 100644 index 2f6c6cf1..00000000 --- a/uSync.Commands/HelpTextResource.resx +++ /dev/null @@ -1,134 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - usage: uSync Init [username] [password] [-sqlce] - -Initializes umbraco, based on current state and settings. - - If the database is missing or blank then init will initialize the database. - - If username and password are supplied, the super user account will be setup with those credentials. - - -sqlce if the DSN entry is blank create a SQLCE dabase in the app_data folder - - - Exits the application - - \ No newline at end of file diff --git a/uSync.Commands/Properties/AssemblyInfo.cs b/uSync.Commands/Properties/AssemblyInfo.cs deleted file mode 100644 index a3819fc3..00000000 --- a/uSync.Commands/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("uSync.Commands")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("uSync.Commands")] -[assembly: AssemblyCopyright("Copyright © 2020")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("6d3b59c1-7a78-43bb-a806-f826fd4477f6")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("8.0.0")] -[assembly: AssemblyFileVersion("8.0.0")] diff --git a/uSync.Commands/app.config b/uSync.Commands/app.config deleted file mode 100644 index 354c7c32..00000000 --- a/uSync.Commands/app.config +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/uSync.Commands/packages.config b/uSync.Commands/packages.config deleted file mode 100644 index 35031aab..00000000 --- a/uSync.Commands/packages.config +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/uSync.Commands/uSync.Commands.csproj b/uSync.Commands/uSync.Commands.csproj deleted file mode 100644 index ceea9b01..00000000 --- a/uSync.Commands/uSync.Commands.csproj +++ /dev/null @@ -1,284 +0,0 @@ - - - - - Debug - AnyCPU - {6D3B59C1-7A78-43BB-A806-F826FD4477F6} - Library - Properties - uSync.BaseCommands - uSync.Commands - v4.7.2 - 512 - true - - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - pdbonly - true - bin\PackageOnlyBuild\ - TRACE - prompt - 4 - - - - ..\packages\ClientDependency.1.9.7\lib\net45\ClientDependency.Core.dll - - - ..\packages\ClientDependency-Mvc5.1.8.0.0\lib\net45\ClientDependency.Core.Mvc.dll - - - ..\packages\CSharpTest.Net.Collections.14.906.1403.1082\lib\net40\CSharpTest.Net.Collections.dll - - - ..\packages\Examine.1.0.0\lib\net452\Examine.dll - - - ..\packages\HtmlAgilityPack.1.8.14\lib\Net45\HtmlAgilityPack.dll - - - ..\packages\SharpZipLib.0.86.0\lib\20\ICSharpCode.SharpZipLib.dll - - - ..\packages\ImageProcessor.2.7.0.100\lib\net452\ImageProcessor.dll - - - ..\packages\LightInject.5.4.0\lib\net46\LightInject.dll - - - ..\packages\LightInject.Annotation.1.1.0\lib\net46\LightInject.Annotation.dll - - - ..\packages\LightInject.Mvc.2.0.0\lib\net46\LightInject.Mvc.dll - - - ..\packages\LightInject.Web.2.0.0\lib\net46\LightInject.Web.dll - - - ..\packages\LightInject.WebApi.2.0.0\lib\net46\LightInject.WebApi.dll - - - ..\packages\Lucene.Net.3.0.3\lib\NET40\Lucene.Net.dll - - - ..\packages\Markdown.2.2.1\lib\net451\Markdown.dll - - - ..\packages\Microsoft.AspNet.Identity.Core.2.2.2\lib\net45\Microsoft.AspNet.Identity.Core.dll - - - ..\packages\Microsoft.AspNet.Identity.Owin.2.2.2\lib\net45\Microsoft.AspNet.Identity.Owin.dll - - - ..\packages\Microsoft.AspNet.SignalR.Core.2.4.0\lib\net45\Microsoft.AspNet.SignalR.Core.dll - - - ..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.2.0.0\lib\netstandard2.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll - - - ..\packages\Microsoft.Owin.4.0.1\lib\net45\Microsoft.Owin.dll - - - ..\packages\Microsoft.Owin.Host.SystemWeb.4.0.1\lib\net45\Microsoft.Owin.Host.SystemWeb.dll - - - ..\packages\Microsoft.Owin.Security.4.0.1\lib\net45\Microsoft.Owin.Security.dll - - - ..\packages\Microsoft.Owin.Security.Cookies.4.0.1\lib\net45\Microsoft.Owin.Security.Cookies.dll - - - ..\packages\Microsoft.Owin.Security.OAuth.4.0.1\lib\net45\Microsoft.Owin.Security.OAuth.dll - - - ..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll - - - ..\packages\MiniProfiler.4.0.138\lib\net461\MiniProfiler.dll - - - ..\packages\MiniProfiler.Shared.4.0.138\lib\net461\MiniProfiler.Shared.dll - - - ..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll - - - ..\packages\NPoco.3.9.4\lib\net45\NPoco.dll - - - ..\packages\Owin.1.0\lib\net40\Owin.dll - - - ..\packages\Semver.2.0.4\lib\net452\Semver.dll - - - ..\packages\Serilog.2.8.0\lib\net46\Serilog.dll - - - ..\packages\Serilog.Enrichers.Process.2.0.1\lib\net45\Serilog.Enrichers.Process.dll - - - ..\packages\Serilog.Enrichers.Thread.3.0.0\lib\net45\Serilog.Enrichers.Thread.dll - - - ..\packages\Serilog.Filters.Expressions.2.0.0\lib\net45\Serilog.Filters.Expressions.dll - - - ..\packages\Serilog.Formatting.Compact.1.0.0\lib\net45\Serilog.Formatting.Compact.dll - - - ..\packages\Serilog.Formatting.Compact.Reader.1.0.3\lib\net45\Serilog.Formatting.Compact.Reader.dll - - - ..\packages\Serilog.Settings.AppSettings.2.2.2\lib\net45\Serilog.Settings.AppSettings.dll - - - ..\packages\Serilog.Sinks.Async.1.3.0\lib\net45\Serilog.Sinks.Async.dll - - - ..\packages\Serilog.Sinks.File.4.0.0\lib\net45\Serilog.Sinks.File.dll - - - ..\packages\Serilog.Sinks.Map.1.0.0\lib\netstandard2.0\Serilog.Sinks.Map.dll - - - ..\packages\Superpower.2.0.0\lib\net45\Superpower.dll - - - - - - - - ..\packages\Umbraco.SqlServerCE.4.0.0.1\lib\net472\System.Data.SqlServerCe.dll - - - ..\packages\Umbraco.SqlServerCE.4.0.0.1\lib\net472\System.Data.SqlServerCe.Entity.dll - - - ..\packages\System.Diagnostics.DiagnosticSource.4.4.1\lib\net46\System.Diagnostics.DiagnosticSource.dll - - - - - ..\packages\Microsoft.AspNet.WebApi.Client.5.2.7\lib\net45\System.Net.Http.Formatting.dll - - - - - - - - ..\packages\System.Threading.Tasks.Dataflow.4.9.0\lib\netstandard2.0\System.Threading.Tasks.Dataflow.dll - - - - ..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll - - - - - - ..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.Helpers.dll - - - ..\packages\Microsoft.AspNet.WebApi.Core.5.2.7\lib\net45\System.Web.Http.dll - - - ..\packages\Microsoft.AspNet.WebApi.WebHost.5.2.7\lib\net45\System.Web.Http.WebHost.dll - - - ..\packages\Microsoft.AspNet.Mvc.5.2.7\lib\net45\System.Web.Mvc.dll - - - ..\packages\Microsoft.AspNet.Razor.3.2.7\lib\net45\System.Web.Razor.dll - - - ..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.dll - - - ..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.Deployment.dll - - - ..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.Razor.dll - - - - - - - - - ..\packages\UmbracoCms.Core.8.1.1\lib\net472\Umbraco.Core.dll - - - ..\packages\UmbracoCms.Web.8.1.1\lib\net472\Umbraco.Examine.dll - - - ..\packages\UmbracoCms.Web.8.1.1\lib\net472\Umbraco.Web.dll - - - ..\packages\UmbracoCms.Web.8.1.1\lib\net472\Umbraco.Web.UI.dll - - - - - - - - True - True - HelpTextResource.resx - - - - - - - - - - - {f2dfcb19-c9ee-471e-b8e2-e0b4dd31761d} - uSync8.BackOffice - - - {79011408-c423-479f-9b0a-8da465de92eb} - uSync8.Core - - - - - ResXFileCodeGenerator - HelpTextResource.Designer.cs - - - - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - \ No newline at end of file diff --git a/uSync.Commands/uSyncCommandComposer.cs b/uSync.Commands/uSyncCommandComposer.cs deleted file mode 100644 index 37ea687b..00000000 --- a/uSync.Commands/uSyncCommandComposer.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Umbraco.Core; -using Umbraco.Core.Composing; -using uSync8.BackOffice.Commands; - -namespace uSync.BaseCommands -{ - /// - /// when the site won't boot, we register - /// just the Init and Quit Commands, - /// - [RuntimeLevel(MinLevel = RuntimeLevel.BootFailed, MaxLevel = RuntimeLevel.Install)] - public class uSyncCommandComposer : IComposer - { - public void Compose(Composition composition) - { - Console.WriteLine("Register for pre boot"); - - composition.RegisterUnique(); - composition.RegisterUnique(); - } - } - - - [ComposeAfter(typeof(uSync8.BackOffice.uSyncBackOfficeComposer))] - public class uSyncCommandBootedComposer : IUserComposer - { - public void Compose(Composition composition) - { - composition.WithCollectionBuilder() - .Add(() => composition.TypeLoader.GetTypes()); - - composition.RegisterUnique(); - } - } -} diff --git a/uSync.Community.Contrib/Mappers/BentoItemMapper.cs b/uSync.Community.Contrib/Mappers/BentoItemMapper.cs new file mode 100644 index 00000000..26760022 --- /dev/null +++ b/uSync.Community.Contrib/Mappers/BentoItemMapper.cs @@ -0,0 +1,133 @@ +using System; +using System.Collections.Generic; +using System.Linq; + +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; + +using Umbraco.Core; +using Umbraco.Core.Services; + +using uSync.ContentEdition.Mapping; +using uSync.Core; +using uSync.Core.Dependency; + +namespace uSync.Community.Contrib.Mappers +{ + public class BentoItemMapper : SyncNestedValueMapperBase, ISyncMapper + { + private readonly string docTypeAliasValue = "contentTypeAlias"; + + public BentoItemMapper(IEntityService entityService, + SyncValueMapperFactory mapperFactory, + IContentTypeService contentTypeService, + IDataTypeService dataTypeService) + : base(entityService, mapperFactory, contentTypeService, dataTypeService) + { } + + public override string Name => "Bento Item Mapper"; + + public override string[] Editors => new string[] + { + "bentoitem.editor" + }; + + /// + /// Get any formatted export values. + /// + /// + /// for 99% of properties you don't need to go in and get the + /// potential internal values, but we do this on export because + /// we want to ensure we trigger formatting of Umbraco.DateTime values + /// + + public override string GetExportValue(object value, string editorAlias) + { + if (value == null) return string.Empty; + + var jsonValue = GetJsonValue(value); + if (jsonValue == null) return value.ToString(); + + if (jsonValue.ContainsKey("contentData")) + { + var contentValue = jsonValue.Value("contentData"); + if (contentValue == null) return value.ToString(); + + var docType = GetDocType(contentValue, this.docTypeAliasValue); + if (docType == null) return value.ToString(); + + GetExportProperties(contentValue, docType); + + return JsonConvert.SerializeObject(jsonValue, Formatting.Indented); + } + + return value.ToString(); + } + + /// + /// Dependency check for bento item + /// + /// + /// a bento item is a single item, stored in json as a link + /// + /// when content is linked, its done via the key. + /// {"id":1161,"key":"0af06fdb-9084-4601-a65f-a9b529e731ad","icon":"icon-brick"} + /// + /// when the content is embedded its in the contentData and behaves like nested content + /// {"id":0,"key":"c1d39dea-b590-4d5c-b213-187c2b303d93","contentData":{"name":"Simple Bento Element","contentTypeAlias":"simpleBentoElement","icon":"icon-document","title":"Some title","link":"umb://document/ca4249ed2b234337b52263cabe5587d1"},"icon":"icon-document"} + /// + /// + public override IEnumerable GetDependencies(object value, string editorAlias, DependencyFlags flags) + { + + var itemValue = GetValueAs(value); + if (itemValue == null) return Enumerable.Empty(); + + return GetItemDependency(itemValue, flags); + } + + protected IEnumerable GetItemDependency(JObject itemValue, DependencyFlags flags) + { + if (itemValue == null) return Enumerable.Empty(); + + if (itemValue.ContainsKey("contentData")) + { + // nested content mode. + var contentData = itemValue.Value("contentData"); + var docTypeAlias = contentData.Value(this.docTypeAliasValue); + if (contentData == null || docTypeAlias == null) + return Enumerable.Empty(); + + var docType = GetDocType(docTypeAlias); + if (docType == null) + return Enumerable.Empty(); + + List dependencies = new List(); + + var docTypeDependency = CreateDocTypeDependency(docType, flags); + dependencies.AddNotNull(docTypeDependency); + + dependencies.AddRange(GetPropertyDependencies(contentData, docType, flags)); + + return dependencies; + } + else + { + // linked content mode + var key = itemValue.Value("key"); + if (key != null) + { + // we need to include the ancestors of any included + // bento items, to ensure we get the library structure + // of the bento items as part of the sync. + var bentoFlags = flags | DependencyFlags.IncludeAncestors; + + var udi = GuidUdi.Create(Constants.UdiEntityType.Document, key); + return CreateDependency(udi as GuidUdi, bentoFlags).AsEnumerableOfOne(); + } + } + + return Enumerable.Empty(); + } + } +} diff --git a/uSync.Community.Contrib/Mappers/BentoStackMapper.cs b/uSync.Community.Contrib/Mappers/BentoStackMapper.cs new file mode 100644 index 00000000..48b89eed --- /dev/null +++ b/uSync.Community.Contrib/Mappers/BentoStackMapper.cs @@ -0,0 +1,112 @@ +using System.Collections.Generic; +using System.Linq; + +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; + +using Umbraco.Core.Services; + +using uSync.ContentEdition.Mapping; +using uSync.Core.Dependency; + +namespace uSync.Community.Contrib.Mappers +{ + public class BentoStackMapper : BentoItemMapper, ISyncMapper + { + private readonly string docTypeAliasValue = "contentTypeAlias"; + + public BentoStackMapper(IEntityService entityService, + SyncValueMapperFactory mapperFactory, + IContentTypeService contentTypeService, + IDataTypeService dataTypeService) + : base(entityService, mapperFactory, contentTypeService, dataTypeService) + { } + + public override string Name => "Bento Stack Mapper"; + + public override string[] Editors => new string[] + { + "bentostack.editor" + }; + + /// + /// Get any formatted export values. + /// + /// + /// for 99% of properties you don't need to go in and get the + /// potential internal values, but we do this on export because + /// we want to ensure we trigger formatting of Umbraco.DateTime values + /// + + public override string GetExportValue(object value, string editorAlias) + { + if (value == null) return string.Empty; + + var stackJson = GetValueAs(value); + if (stackJson == null) return value.ToString(); + + foreach(var stack in stackJson) + { + var areas = stack.Value("areas"); + if (areas == null) continue; + + foreach(var area in areas) + { + var contentData = area.Value("contentData"); + if (contentData != null) + { + // embedd mode. + var docType = GetDocType(contentData, this.docTypeAliasValue); + if (docType == null) continue; + + GetExportProperties(contentData, docType); + } + } + + return JsonConvert.SerializeObject(stackJson, Formatting.Indented); + } + + return value.ToString(); + } + + /// + /// Dependency check for bento item + /// + /// + /// a bento item is a single item, stored in json as a link + /// + /// when content is linked, its done via the key. + /// {"id":1161,"key":"0af06fdb-9084-4601-a65f-a9b529e731ad","icon":"icon-brick"} + /// + /// when the content is embedded its in the contentData and behaves like nested content + /// {"id":0,"key":"c1d39dea-b590-4d5c-b213-187c2b303d93","contentData":{"name":"Simple Bento Element","contentTypeAlias":"simpleBentoElement","icon":"icon-document","title":"Some title","link":"umb://document/ca4249ed2b234337b52263cabe5587d1"},"icon":"icon-document"} + /// + /// + public override IEnumerable GetDependencies(object value, string editorAlias, DependencyFlags flags) + { + + if (value == null) return Enumerable.Empty(); + + var stackJson = GetValueAs(value); + if (stackJson == null) return Enumerable.Empty(); + + List dependencies = new List(); + + foreach (var stack in stackJson) + { + var areas = stack.Value("areas"); + if (areas == null) continue; + + foreach (var area in areas) + { + if (area is JObject itemValue) + { + dependencies.AddRange(GetItemDependency(itemValue, flags)); + } + } + } + + return dependencies; + } + } +} diff --git a/uSync8.Community.Contrib/Mappers/DocTypeGridMapper.cs b/uSync.Community.Contrib/Mappers/DocTypeGridMapper.cs similarity index 94% rename from uSync8.Community.Contrib/Mappers/DocTypeGridMapper.cs rename to uSync.Community.Contrib/Mappers/DocTypeGridMapper.cs index 9fe48684..044b22c3 100644 --- a/uSync8.Community.Contrib/Mappers/DocTypeGridMapper.cs +++ b/uSync.Community.Contrib/Mappers/DocTypeGridMapper.cs @@ -7,10 +7,10 @@ using System.Threading.Tasks; using Umbraco.Core; using Umbraco.Core.Services; -using uSync8.ContentEdition.Mapping; -using uSync8.Core.Dependency; +using uSync.ContentEdition.Mapping; +using uSync.Core.Dependency; -namespace uSync8.Community.Contrib.Mappers +namespace uSync.Community.Contrib.Mappers { /// /// value/dependency mapper for DocTypeGridEditor. @@ -39,9 +39,10 @@ public class DocTypeGridMapper : SyncNestedValueMapperBase, ISyncMapper private readonly string docTypeAliasValue = "dtgeContentTypeAlias"; public DocTypeGridMapper(IEntityService entityService, + SyncValueMapperFactory mapperFactory, IContentTypeService contentTypeService, IDataTypeService dataTypeService) - : base(entityService, contentTypeService, dataTypeService) + : base(entityService, mapperFactory, contentTypeService, dataTypeService) { } public override string Name => "DocType Grid Mapper"; diff --git a/uSync8.Community.Contrib/readme.md b/uSync.Community.Contrib/readme.md similarity index 100% rename from uSync8.Community.Contrib/readme.md rename to uSync.Community.Contrib/readme.md diff --git a/uSync.Community.Contrib/uSync.Community.Contrib.csproj b/uSync.Community.Contrib/uSync.Community.Contrib.csproj new file mode 100644 index 00000000..41d2d461 --- /dev/null +++ b/uSync.Community.Contrib/uSync.Community.Contrib.csproj @@ -0,0 +1,11 @@ + + + + netcoreapp3.1 + + + + + + + diff --git a/uSync.Community.Contrib/uSyncContrib.cs b/uSync.Community.Contrib/uSyncContrib.cs new file mode 100644 index 00000000..73771966 --- /dev/null +++ b/uSync.Community.Contrib/uSyncContrib.cs @@ -0,0 +1,6 @@ +namespace uSync.Community.Contrib +{ + public class uSyncContrib + { + } +} diff --git a/uSync.Console/App.config b/uSync.Console/App.config deleted file mode 100644 index 4ebd1216..00000000 --- a/uSync.Console/App.config +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/uSync.Console/BootCommands.cs b/uSync.Console/BootCommands.cs deleted file mode 100644 index c140670b..00000000 --- a/uSync.Console/BootCommands.cs +++ /dev/null @@ -1,137 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Configuration; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Xml.Linq; -using Umbraco.Core; -using Umbraco.Core.Composing; -using Umbraco.Core.IO; -using uSync.BaseCommands; -using uSync8.BackOffice.Commands; - -namespace uSync.ConsoleApp -{ - /// - /// Dealing with the special case when you have a BootFail, - /// but still want to try and run some commands. - /// - public class BootCommands - { - private readonly TextReader reader; - private readonly TextWriter writer; - private readonly IFactory factory; - - public BootCommands(TextReader reader, TextWriter writer, - IFactory factory) - { - this.reader = reader; - this.writer = writer; - this.factory = factory; - } - - /// - /// Special process we do when boot fails. - /// - /// - /// this lets us do things like run the Init command - /// event though we haven't been able to boot up umbraco. - /// - /// a boot fail might occur when one or both of the UmbracoVersion - /// and Umbraco Connection string are set, but the DB isn't there - /// or setup. - /// - /// by processing a boot fail we can 'fix' those settings, restart - /// and boot into the proper setup. - /// - public async Task RunBootUpSteps(string[] args) - { - switch (args[0].ToLower()) - { - case "init": - return await BootInit(args); - case "quit": - return await BootQuit(args); - default: - await writer.WriteLineAsync(" Umbraco is not setup, only 'init' and 'quit' commands will work at the moment"); - return SyncCommandResult.Complete; - } - } - - private async Task BootInit(string[] args) - { - if (Current.RuntimeState.Level < RuntimeLevel.Install) - { - await writer.WriteLineAsync(" Cannot initialize, because umbraco won't boot..."); - if (Current.RuntimeState.BootFailedException - .Message.InvariantContains("A connection string is configured but")) - { - // connection string fail. - await writer.WriteLineAsync(" Boot failed for connection string, attempting to fix"); - var configVersion = ConfigurationManager.AppSettings[Constants.AppSettings.ConfigurationStatus]; - if (!string.IsNullOrWhiteSpace(configVersion)) - { - await writer.WriteLineAsync(" The config version isn't blank, this migh be stopping us from booting"); - await writer.WriteLineAsync(" Cleaning the config version, then run usync init again..."); - SaveSetting(Constants.AppSettings.ConfigurationStatus, ""); - return SyncCommandResult.Restart; - - } - else - { - await writer.WriteLineAsync($" Boot failed for a reason not to do with being not setup:\n {Current.RuntimeState.BootFailedException}"); - await writer.WriteLineAsync("\n We can't setup this site until it isn't booting for the right reasons (missing db)"); - } - - return SyncCommandResult.Error; - } - } - - // if we get here, then we will be and Install level. - try - { - var installCommand = factory.GetInstance(); - return await installCommand.Run(args.Skip(1).ToArray()); - } - catch (InvalidOperationException ex) - { - await writer.WriteLineAsync($" Failed to run initilization - {ex.Message}"); - return SyncCommandResult.Error; - } - } - - private async Task BootQuit(string[] args) - { - await writer.WriteLineAsync("Quitting..."); - return SyncCommandResult.Complete; - } - - - /// - /// same a setting back to the web.config - /// - /// - /// From Umbraco.Core - /// - private void SaveSetting(string key, string value) - { - var fileName = IOHelper.MapPath(string.Format("{0}/web.config", SystemDirectories.Root)); - var xml = XDocument.Load(fileName, LoadOptions.PreserveWhitespace); - - var appSettings = xml.Root.DescendantsAndSelf("appSettings").Single(); - - // Update appSetting if it exists, or else create a new appSetting for the given key and value - var setting = appSettings.Descendants("add").FirstOrDefault(s => s.Attribute("key").Value == key); - if (setting == null) - appSettings.Add(new XElement("add", new XAttribute("key", key), new XAttribute("value", value))); - else - setting.Attribute("value").Value = value; - - xml.Save(fileName, SaveOptions.DisableFormatting); - ConfigurationManager.RefreshSection("appSettings"); - } - - } -} diff --git a/uSync.Console/ConsoleHost.cs b/uSync.Console/ConsoleHost.cs deleted file mode 100644 index 21878952..00000000 --- a/uSync.Console/ConsoleHost.cs +++ /dev/null @@ -1,164 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Umbraco.Core; -using Umbraco.Core.Composing; -using Umbraco.Core.Configuration; -using uSync8.BackOffice; -using uSync8.BackOffice.Commands; -using uSync8.BackOffice.Models; - -namespace uSync.ConsoleApp -{ - /// - /// Host for Umbraco in the console. - /// - public class ConsoleHost - { - private readonly ConsoleRuntime runtime; - private readonly TextReader reader; - private readonly TextWriter writer; - - private readonly IFactory factory; - - public ConsoleHost(TextReader reader, TextWriter writer) - { - this.reader = reader; - this.writer = writer; - - this.runtime = new ConsoleRuntime(reader, writer); - - var register = RegisterFactory.Create(); - factory = runtime.Boot(register); - } - - public async Task Run(string[] args) - { - var result = SyncCommandResult.NoResult; - - // clear the first line. - await writer.WriteAsync("\r"); - - if (args.Length == 0) - { - await WriteInteractiveHeader(); - } - else - { - result = await ProcessCommand(args); - if (result < SyncCommandResult.Complete) - { - result = SyncCommandResult.Complete; - } - } - - while( result < SyncCommandResult.Complete) - { - await writer.WriteAsync("uSync>"); - var command = await reader.ReadLineAsync(); - - if (!string.IsNullOrWhiteSpace(command)) - { - var commandArgs = command.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries); - result = await ProcessCommand(commandArgs); - } - } - - return result; - } - - public async Task ProcessCommand(string[] args) - { - if (Current.RuntimeState.Level > RuntimeLevel.Install) - { - var alias = args[0]; - var commandFactory = factory.GetInstance(); - if (commandFactory == null) { - writer.WriteLine("Cannot load the commands :("); - return SyncCommandResult.Error; - } - - if (alias.InvariantEquals("help")) - { - return await ShowHelp(commandFactory, args); - } - - var command = commandFactory.GetCommand(alias); - if (command == null) - { - await writer.WriteLineAsync("Unknown command"); - return await ShowHelp(commandFactory, args); - } - else - { - return await command.Run(args.Skip(1).ToArray()); - } - } - else - { - var bootCommands = new BootCommands(reader, writer, factory); - return await bootCommands.RunBootUpSteps(args); - } - } - - - private async Task ShowHelp(SyncCommandFactory commandFactory, string[] args) - { - - if (args.Length < 2) - { - await writer.WriteLineAsync("usage: uSync [args] [options]"); - await writer.WriteLineAsync("type 'usync Help for help on a specific command"); - await writer.WriteLineAsync("\nAvailable commands:\n"); - - foreach (var command in commandFactory.GetAll()) - { - await command.ShowHelp(false); - await writer.WriteLineAsync(); - } - - } - else - { - var command = commandFactory.GetCommand(args[1]); - if (command != null) - { - await command.ShowHelp(true); - await writer.WriteLineAsync(); - } - else - { - await writer.WriteLineAsync($"Unknown command {args[1]}"); - } - } - - await writer.WriteLineAsync("For more information, visit https://docs.jumoo.co.uk/uSync/command-line"); - return SyncCommandResult.NoResult; - } - - /// - /// write out the first few lines when you load interactively. - /// - private async Task WriteInteractiveHeader() - { - var umbracoVersion = UmbracoVersion.SemanticVersion.ToSemanticString(); - await writer.WriteLineAsync($"Umbraco : {umbracoVersion} - RuntimeState:[{Current.RuntimeState.Level}]"); - - var uSyncVersion = typeof(uSync8BackOffice).Assembly.GetName().Version.ToString(); - var addOnNames = new List(); - foreach (var addOn in TypeFinder.FindClassesOfType()) - { - if (Activator.CreateInstance(addOn) is ISyncAddOn instance) - { - addOnNames.Add(instance.Name); - } - } - - await writer.WriteLineAsync($"uSync : {uSyncVersion} [{string.Join(" ", addOnNames)}]\n"); - } - - } -} diff --git a/uSync.Console/ConsoleRuntime.cs b/uSync.Console/ConsoleRuntime.cs deleted file mode 100644 index 26a62eb3..00000000 --- a/uSync.Console/ConsoleRuntime.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Web; -using Umbraco.Core; -using Umbraco.Core.Composing; -using Umbraco.Core.Runtime; -using Umbraco.Web; - -namespace uSync.ConsoleApp -{ - /// - /// wrapper for the Umbraco Core runtime, via a console - /// - /// - /// - public class ConsoleRuntime : CoreRuntime - { - private readonly TextReader reader; - private readonly TextWriter writer; - - public ConsoleRuntime(TextReader reader, TextWriter writer) - : base() - { - this.reader = reader; - this.writer = writer; - } - - public override IFactory Boot(IRegister register) - { - register.Register(this.reader); - register.Register(this.writer); - register.Register(); - return base.Boot(register); - } - } - - /// - /// provide a HttpContext accesstor, that just returns null. - /// - public class NullHttpContextAccessor : IHttpContextAccessor - { - public HttpContext HttpContext - { - get { return HttpContext = null; } - set { throw new NotImplementedException(); } - } - } - -} diff --git a/uSync.Console/Program.cs b/uSync.Console/Program.cs deleted file mode 100644 index 3233f1f7..00000000 --- a/uSync.Console/Program.cs +++ /dev/null @@ -1,118 +0,0 @@ -using System; -using System.IO; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Reflection; -using uSync8.BackOffice.Commands; -using System.Threading; - -namespace uSync.ConsoleApp -{ - /// - /// entry point - /// - /// - /// most of this is how Chauffeur does it. - /// https://github.com/aaronpowell/Chauffeur - /// - /// If you want a command line less tied into uSync, with a lot more - /// robust extension points take a look that. - /// - class Program - { - const string uSyncAppDomain = "uSync-AppDomain"; - - static void Main(string[] args) - { - if (AppDomain.CurrentDomain.FriendlyName == uSyncAppDomain) - { - Console.WriteLine($"uSync Umbraco Command Line [" + - $"{Assembly.GetExecutingAssembly().GetName().Version}] "); - - Console.Write("Initialising..."); - - var consoleHost = new ConsoleHost(Console.In, Console.Out); - var task = consoleHost.Run(args); - task.Wait(); - - if (task.Result == SyncCommandResult.Restart) - { - Console.Write("Restarting..."); - InitApplication(args); - } - } - else - { - InitApplication(args); - } - } - - /// - /// finds, the umbraco folder, and intializes the app - /// - /// - /// All of this code borrows heviely from Chauffeur - /// https://github.com/aaronpowell/Chauffeur - /// - /// - static void InitApplication(string[] args) - { - var currentAssembly = Assembly.GetExecutingAssembly(); - var exePath = Path.GetDirectoryName(currentAssembly.Location); - var siteRoot = FindSiteRoot(exePath); - - var configPath = Path.Combine(siteRoot, "web.config"); - var setup = new AppDomainSetup - { - ConfigurationFile = configPath, - ApplicationBase = siteRoot, - PrivateBinPath = exePath - }; - - var domain = AppDomain.CreateDomain(uSyncAppDomain, - AppDomain.CurrentDomain.Evidence, setup); - - foreach(var assembly in AppDomain.CurrentDomain.GetAssemblies()) - { - if (File.Exists(assembly.FullName)) - domain.Load(assembly.FullName); - } - - domain.SetData("DataDirectory", Path.Combine(siteRoot, "App_Data")); - domain.SetData(".appDomain", "From Domain"); - domain.SetData(".appId", "From Domain"); - domain.SetData(".appVPath", exePath); - domain.SetData(".appPath", exePath); - domain.SetData(".appDomain", "From Domain"); - - var thread = Thread.GetDomain(); - - thread.SetData(".appDomain", "From Thread"); - thread.SetData(".appId", "From Thread"); - thread.SetData(".appVPath", exePath); - thread.SetData(".appPath", exePath); - - var thisAssembly = new FileInfo(currentAssembly.Location); - domain.ExecuteAssembly(thisAssembly.FullName, args); - } - - - /// - /// go up the tree, until we find the folder with the web.config in it - /// - static string FindSiteRoot(string path) - { - var folder = Path.GetDirectoryName(path); - if (string.IsNullOrWhiteSpace(folder)) - throw new EntryPointNotFoundException("Can't find the umbraco folder"); - - if (File.Exists(Path.Combine(folder, "web.config"))) return folder; - - - return FindSiteRoot(folder); - - } - } -} diff --git a/uSync.Console/Properties/AssemblyInfo.cs b/uSync.Console/Properties/AssemblyInfo.cs deleted file mode 100644 index a5e18edf..00000000 --- a/uSync.Console/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("uSync.Console")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("uSync.Console")] -[assembly: AssemblyCopyright("Copyright © 2020")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("7ca1a210-6cb6-4568-9237-62c678877934")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("8.0.0")] -[assembly: AssemblyFileVersion("8.0.0")] diff --git a/uSync.Console/packages.config b/uSync.Console/packages.config deleted file mode 100644 index 35031aab..00000000 --- a/uSync.Console/packages.config +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/uSync.Console/scripts/init.ps1 b/uSync.Console/scripts/init.ps1 deleted file mode 100644 index b8695948..00000000 --- a/uSync.Console/scripts/init.ps1 +++ /dev/null @@ -1,3 +0,0 @@ -param($installPath, $toolsPath, $package) - -Import-Module(Join-Path $toolsPath uSyncCli.psm1) \ No newline at end of file diff --git a/uSync.Console/scripts/uSyncCli.psm1 b/uSync.Console/scripts/uSyncCli.psm1 deleted file mode 100644 index e29f3907..00000000 --- a/uSync.Console/scripts/uSyncCli.psm1 +++ /dev/null @@ -1,16 +0,0 @@ -function usync() { - Write-Host 'uSync Cli.'; - - $project = Get-Project - $projectDir = Split-Path $project.FullName - $uSyncExe = Join-Path $projectDir 'bin\usync.exe' - - if (Test-Path $uSyncExe) { - & $uSyncExe $args - } - else { - Write-Host "Cannot find uSync.exe in the project's bin folder" - } -} - -Export-ModuleMember usync \ No newline at end of file diff --git a/uSync.Console/uSync.Console.csproj b/uSync.Console/uSync.Console.csproj deleted file mode 100644 index f0c69cbe..00000000 --- a/uSync.Console/uSync.Console.csproj +++ /dev/null @@ -1,278 +0,0 @@ - - - - - Debug - AnyCPU - {7CA1A210-6CB6-4568-9237-62C678877934} - Exe - uSync.ConsoleApp - uSync - v4.7.2 - 512 - true - true - - - - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - AnyCPU - pdbonly - true - bin\PackageOnlyBuild\ - TRACE - prompt - 4 - - - - ..\packages\ClientDependency.1.9.7\lib\net45\ClientDependency.Core.dll - - - ..\packages\ClientDependency-Mvc5.1.8.0.0\lib\net45\ClientDependency.Core.Mvc.dll - - - ..\packages\CSharpTest.Net.Collections.14.906.1403.1082\lib\net40\CSharpTest.Net.Collections.dll - - - ..\packages\Examine.1.0.0\lib\net452\Examine.dll - - - ..\packages\HtmlAgilityPack.1.8.14\lib\Net45\HtmlAgilityPack.dll - - - ..\packages\SharpZipLib.0.86.0\lib\20\ICSharpCode.SharpZipLib.dll - - - ..\packages\ImageProcessor.2.7.0.100\lib\net452\ImageProcessor.dll - - - ..\packages\LightInject.5.4.0\lib\net46\LightInject.dll - - - ..\packages\LightInject.Annotation.1.1.0\lib\net46\LightInject.Annotation.dll - - - ..\packages\LightInject.Mvc.2.0.0\lib\net46\LightInject.Mvc.dll - - - ..\packages\LightInject.Web.2.0.0\lib\net46\LightInject.Web.dll - - - ..\packages\LightInject.WebApi.2.0.0\lib\net46\LightInject.WebApi.dll - - - ..\packages\Lucene.Net.3.0.3\lib\NET40\Lucene.Net.dll - - - ..\packages\Markdown.2.2.1\lib\net451\Markdown.dll - - - ..\packages\Microsoft.AspNet.Identity.Core.2.2.2\lib\net45\Microsoft.AspNet.Identity.Core.dll - - - ..\packages\Microsoft.AspNet.Identity.Owin.2.2.2\lib\net45\Microsoft.AspNet.Identity.Owin.dll - - - ..\packages\Microsoft.AspNet.SignalR.Core.2.4.0\lib\net45\Microsoft.AspNet.SignalR.Core.dll - - - ..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.2.0.0\lib\netstandard2.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll - - - ..\packages\Microsoft.Owin.4.0.1\lib\net45\Microsoft.Owin.dll - - - ..\packages\Microsoft.Owin.Host.SystemWeb.4.0.1\lib\net45\Microsoft.Owin.Host.SystemWeb.dll - - - ..\packages\Microsoft.Owin.Security.4.0.1\lib\net45\Microsoft.Owin.Security.dll - - - ..\packages\Microsoft.Owin.Security.Cookies.4.0.1\lib\net45\Microsoft.Owin.Security.Cookies.dll - - - ..\packages\Microsoft.Owin.Security.OAuth.4.0.1\lib\net45\Microsoft.Owin.Security.OAuth.dll - - - ..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll - - - ..\packages\MiniProfiler.4.0.138\lib\net461\MiniProfiler.dll - - - ..\packages\MiniProfiler.Shared.4.0.138\lib\net461\MiniProfiler.Shared.dll - - - ..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll - - - ..\packages\NPoco.3.9.4\lib\net45\NPoco.dll - - - ..\packages\Owin.1.0\lib\net40\Owin.dll - - - ..\packages\Semver.2.0.4\lib\net452\Semver.dll - - - ..\packages\Serilog.2.8.0\lib\net46\Serilog.dll - - - ..\packages\Serilog.Enrichers.Process.2.0.1\lib\net45\Serilog.Enrichers.Process.dll - - - ..\packages\Serilog.Enrichers.Thread.3.0.0\lib\net45\Serilog.Enrichers.Thread.dll - - - ..\packages\Serilog.Filters.Expressions.2.0.0\lib\net45\Serilog.Filters.Expressions.dll - - - ..\packages\Serilog.Formatting.Compact.1.0.0\lib\net45\Serilog.Formatting.Compact.dll - - - ..\packages\Serilog.Formatting.Compact.Reader.1.0.3\lib\net45\Serilog.Formatting.Compact.Reader.dll - - - ..\packages\Serilog.Settings.AppSettings.2.2.2\lib\net45\Serilog.Settings.AppSettings.dll - - - ..\packages\Serilog.Sinks.Async.1.3.0\lib\net45\Serilog.Sinks.Async.dll - - - ..\packages\Serilog.Sinks.File.4.0.0\lib\net45\Serilog.Sinks.File.dll - - - ..\packages\Serilog.Sinks.Map.1.0.0\lib\netstandard2.0\Serilog.Sinks.Map.dll - - - ..\packages\Superpower.2.0.0\lib\net45\Superpower.dll - - - - - - - - ..\packages\Umbraco.SqlServerCE.4.0.0.1\lib\net472\System.Data.SqlServerCe.dll - - - ..\packages\Umbraco.SqlServerCE.4.0.0.1\lib\net472\System.Data.SqlServerCe.Entity.dll - - - ..\packages\System.Diagnostics.DiagnosticSource.4.4.1\lib\net46\System.Diagnostics.DiagnosticSource.dll - - - - - ..\packages\Microsoft.AspNet.WebApi.Client.5.2.7\lib\net45\System.Net.Http.Formatting.dll - - - - - - - - ..\packages\System.Threading.Tasks.Dataflow.4.9.0\lib\netstandard2.0\System.Threading.Tasks.Dataflow.dll - - - - ..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll - - - - - ..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.Helpers.dll - - - ..\packages\Microsoft.AspNet.WebApi.Core.5.2.7\lib\net45\System.Web.Http.dll - - - ..\packages\Microsoft.AspNet.WebApi.WebHost.5.2.7\lib\net45\System.Web.Http.WebHost.dll - - - ..\packages\Microsoft.AspNet.Mvc.5.2.7\lib\net45\System.Web.Mvc.dll - - - ..\packages\Microsoft.AspNet.Razor.3.2.7\lib\net45\System.Web.Razor.dll - - - ..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.dll - - - ..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.Deployment.dll - - - ..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.Razor.dll - - - - - - - - - ..\packages\UmbracoCms.Core.8.1.1\lib\net472\Umbraco.Core.dll - - - ..\packages\UmbracoCms.Web.8.1.1\lib\net472\Umbraco.Examine.dll - - - ..\packages\UmbracoCms.Web.8.1.1\lib\net472\Umbraco.Web.dll - - - ..\packages\UmbracoCms.Web.8.1.1\lib\net472\Umbraco.Web.UI.dll - - - - - - - - - - - - - - - - - - - {6D3B59C1-7A78-43BB-A806-F826FD4477F6} - uSync.Commands - - - {F2DFCB19-C9EE-471E-B8E2-E0B4DD31761D} - uSync8.BackOffice - - - - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - \ No newline at end of file diff --git a/uSync.Console/uSync.Console.nuspec b/uSync.Console/uSync.Console.nuspec deleted file mode 100644 index 56eb2c21..00000000 --- a/uSync.Console/uSync.Console.nuspec +++ /dev/null @@ -1,25 +0,0 @@ - - - - uSync.Console - 8.0.0-alpha58 - uSync8 Command Line - Kevin Jump - Jumoo - false - Adds a command line to uSync - uSync Command Line - - 8.0 - Initial Release. - - umbraco usync - - - - - - - - - - \ No newline at end of file diff --git a/uSync8.ContentEdition/Extensions/ContentScheduleExtensions.cs b/uSync.ContentEdition/Extensions/ContentScheduleExtensions.cs similarity index 97% rename from uSync8.ContentEdition/Extensions/ContentScheduleExtensions.cs rename to uSync.ContentEdition/Extensions/ContentScheduleExtensions.cs index d06ac9ea..da01a5fe 100644 --- a/uSync8.ContentEdition/Extensions/ContentScheduleExtensions.cs +++ b/uSync.ContentEdition/Extensions/ContentScheduleExtensions.cs @@ -7,7 +7,7 @@ using Umbraco.Core; using Umbraco.Core.Models; -namespace uSync8.ContentEdition.Extensions +namespace uSync.ContentEdition.Extensions { public static class ContentScheduleExtensions { diff --git a/uSync.ContentEdition/Extensions/EventMessageExtensions.cs b/uSync.ContentEdition/Extensions/EventMessageExtensions.cs new file mode 100644 index 00000000..c95ce5f8 --- /dev/null +++ b/uSync.ContentEdition/Extensions/EventMessageExtensions.cs @@ -0,0 +1,21 @@ +using System.Linq; + +using Umbraco.Core.Events; + +namespace uSync.ContentEdition +{ + public static class EventMessageExtensions + { + public static string FormatMessages(this EventMessages eventMessages, string seprerator = " : ") + { + if (eventMessages != null) + { + return string.Join(seprerator, + eventMessages.GetAll() + .Select(x => $"{x.Category} {x.Message}")); + } + + return string.Empty; + } + } +} diff --git a/uSync8.ContentEdition/Extensions/PublishResultExtensions.cs b/uSync.ContentEdition/Extensions/PublishResultExtensions.cs similarity index 58% rename from uSync8.ContentEdition/Extensions/PublishResultExtensions.cs rename to uSync.ContentEdition/Extensions/PublishResultExtensions.cs index 6eb4577f..8cbee8b0 100644 --- a/uSync8.ContentEdition/Extensions/PublishResultExtensions.cs +++ b/uSync.ContentEdition/Extensions/PublishResultExtensions.cs @@ -7,7 +7,7 @@ using Umbraco.Core; using Umbraco.Core.Services; -namespace uSync8.ContentEdition +namespace uSync.ContentEdition { public static class PublishResultExtensions { @@ -18,13 +18,8 @@ public static Attempt ToAttempt(this PublishResult result) { if (result.Success) return Attempt.Succeed("Published"); - var errorMessage = ""; - if (result.EventMessages.Count > 0) - { - errorMessage = string.Join(": ", result.EventMessages.GetAll().Select(x => $"{x.Category}: {x.Message}")); - } - - return Attempt.Fail($"Publish Failed {result.Result} {errorMessage}"); + var errorMessage = result.EventMessages.FormatMessages(":"); + return Attempt.Fail($"Publish failed: {result.Result} {errorMessage}"); } } } \ No newline at end of file diff --git a/uSync8.ContentEdition/Handlers/ContentHandler.cs b/uSync.ContentEdition/Handlers/ContentHandler.cs similarity index 54% rename from uSync8.ContentEdition/Handlers/ContentHandler.cs rename to uSync.ContentEdition/Handlers/ContentHandler.cs index 6ba44418..550e4303 100644 --- a/uSync8.ContentEdition/Handlers/ContentHandler.cs +++ b/uSync.ContentEdition/Handlers/ContentHandler.cs @@ -5,19 +5,20 @@ using Umbraco.Core.Models; using Umbraco.Core.Services; using Umbraco.Core.Services.Implement; +using Umbraco.Core.Strings; -using uSync8.BackOffice; -using uSync8.BackOffice.Configuration; -using uSync8.BackOffice.Services; -using uSync8.BackOffice.SyncHandlers; -using uSync8.Core; -using uSync8.Core.Dependency; -using uSync8.Core.Serialization; -using uSync8.Core.Tracking; +using uSync.BackOffice; +using uSync.BackOffice.Configuration; +using uSync.BackOffice.Services; +using uSync.BackOffice.SyncHandlers; +using uSync.Core; +using uSync.Core.Dependency; +using uSync.Core.Serialization; +using uSync.Core.Tracking; using static Umbraco.Core.Constants; -namespace uSync8.ContentEdition.Handlers +namespace uSync.ContentEdition.Handlers { [SyncHandler("contentHandler", "Content", "Content", uSyncBackOfficeConstants.Priorites.Content , Icon = "icon-document usync-addon-icon", IsTwoPass = true, EntityType = UdiEntityType.Document)] @@ -26,9 +27,9 @@ public class ContentHandler : ContentHandlerBase, ISy public override string Group => uSyncBackOfficeConstants.Groups.Content; private readonly IContentService contentService; - private bool performDoubleLookup = true; public ContentHandler( + IShortStringHelper shortStringHelper, IContentService contentService, IEntityService entityService, IProfilingLogger logger, @@ -36,30 +37,10 @@ public ContentHandler( ISyncSerializer serializer, ISyncItemFactory syncItemFactory, SyncFileService syncFileService) - : base(entityService, logger, appCaches, serializer, syncItemFactory, syncFileService) + : base(shortStringHelper, entityService, logger, appCaches, serializer, syncItemFactory, syncFileService) { this.contentService = contentService; - performDoubleLookup = UmbracoVersion.LocalVersion.Major != 8 || UmbracoVersion.LocalVersion.Minor < 4; } - - [Obsolete("Use constructors with collections")] - protected ContentHandler( - IEntityService entityService, - IProfilingLogger logger, - IContentService contentService, - ISyncSerializer serializer, - ISyncTracker tracker, - AppCaches appCaches, - ISyncDependencyChecker checker, - SyncFileService syncFileService) - : base(entityService, logger, serializer, tracker, appCaches, checker, syncFileService) - { - this.contentService = contentService; - - performDoubleLookup = UmbracoVersion.LocalVersion.Major != 8 || UmbracoVersion.LocalVersion.Minor < 4; - - } - protected override void DeleteViaService(IContent item) => contentService.Delete(item); @@ -67,21 +48,7 @@ protected override IContent GetFromService(int id) => contentService.GetById(id); protected override IContent GetFromService(Guid key) - { - if (performDoubleLookup) - { - // FIX: alpha bug - getby key is not always uptodate - var entity = entityService.Get(key); - if (entity != null) - return contentService.GetById(entity.Id); - - return null; - } - else - { - return contentService.GetById(key); - } - } + => contentService.GetById(key); protected override IContent GetFromService(string alias) => null; diff --git a/uSync8.ContentEdition/Handlers/ContentHandlerBase.cs b/uSync.ContentEdition/Handlers/ContentHandlerBase.cs similarity index 80% rename from uSync8.ContentEdition/Handlers/ContentHandlerBase.cs rename to uSync.ContentEdition/Handlers/ContentHandlerBase.cs index 868cba1c..806ab423 100644 --- a/uSync8.ContentEdition/Handlers/ContentHandlerBase.cs +++ b/uSync.ContentEdition/Handlers/ContentHandlerBase.cs @@ -7,18 +7,20 @@ using Umbraco.Core.Logging; using Umbraco.Core.Models; using Umbraco.Core.Services; -using uSync8.BackOffice; -using uSync8.BackOffice.Configuration; -using uSync8.BackOffice.Services; -using uSync8.BackOffice.SyncHandlers; -using uSync8.ContentEdition.Serializers; -using uSync8.Core; -using uSync8.Core.Dependency; -using uSync8.Core.Extensions; -using uSync8.Core.Serialization; -using uSync8.Core.Tracking; - -namespace uSync8.ContentEdition.Handlers +using Umbraco.Core.Strings; + +using uSync.BackOffice; +using uSync.BackOffice.Configuration; +using uSync.BackOffice.Services; +using uSync.BackOffice.SyncHandlers; +using uSync.ContentEdition.Serializers; +using uSync.Core; +using uSync.Core.Dependency; +using uSync.Core.Extensions; +using uSync.Core.Serialization; +using uSync.Core.Tracking; + +namespace uSync.ContentEdition.Handlers { /// /// base for all content based handlers @@ -34,36 +36,14 @@ public abstract class ContentHandlerBase : SyncHandlerTreeBas { protected ContentHandlerBase( + IShortStringHelper shortStringHelper, IEntityService entityService, IProfilingLogger logger, AppCaches appCaches, ISyncSerializer serializer, ISyncItemFactory syncItemFactory, SyncFileService syncFileService) - : base(entityService, logger, appCaches, serializer, syncItemFactory, syncFileService) - { } - - [Obsolete("Use constructors with collections")] - protected ContentHandlerBase( - IEntityService entityService, - IProfilingLogger logger, - ISyncSerializer serializer, - ISyncTracker tracker, - AppCaches appCaches, - SyncFileService syncFileService) - : base(entityService, logger, serializer, tracker, appCaches, syncFileService) - { } - - [Obsolete("Use constructors with collections")] - protected ContentHandlerBase( - IEntityService entityService, - IProfilingLogger logger, - ISyncSerializer serializer, - ISyncTracker tracker, - AppCaches appCaches, - ISyncDependencyChecker checker, - SyncFileService syncFileService) - : base(entityService, logger, serializer, tracker, appCaches, checker, syncFileService) + : base(shortStringHelper, entityService, logger, appCaches, serializer, syncItemFactory, syncFileService) { } protected override string GetItemMatchString(TObject item) diff --git a/uSync8.ContentEdition/Handlers/ContentTemplateHandler.cs b/uSync.ContentEdition/Handlers/ContentTemplateHandler.cs similarity index 71% rename from uSync8.ContentEdition/Handlers/ContentTemplateHandler.cs rename to uSync.ContentEdition/Handlers/ContentTemplateHandler.cs index cb3975ce..08fb000e 100644 --- a/uSync8.ContentEdition/Handlers/ContentTemplateHandler.cs +++ b/uSync.ContentEdition/Handlers/ContentTemplateHandler.cs @@ -7,19 +7,20 @@ using Umbraco.Core.Models; using Umbraco.Core.Services; using Umbraco.Core.Services.Implement; +using Umbraco.Core.Strings; -using uSync8.BackOffice; -using uSync8.BackOffice.Configuration; -using uSync8.BackOffice.Services; -using uSync8.BackOffice.SyncHandlers; -using uSync8.ContentEdition.Serializers; -using uSync8.Core; -using uSync8.Core.Dependency; -using uSync8.Core.Tracking; +using uSync.BackOffice; +using uSync.BackOffice.Configuration; +using uSync.BackOffice.Services; +using uSync.BackOffice.SyncHandlers; +using uSync.ContentEdition.Serializers; +using uSync.Core; +using uSync.Core.Dependency; +using uSync.Core.Tracking; using static Umbraco.Core.Constants; -namespace uSync8.ContentEdition.Handlers +namespace uSync.ContentEdition.Handlers { [SyncHandler("contentTemplateHandler", "Blueprints", "Blueprints", uSyncBackOfficeConstants.Priorites.ContentTemplate , Icon = "icon-document-dashed-line usync-addon-icon", IsTwoPass = true, EntityType = UdiEntityType.DocumentBlueprint)] @@ -30,6 +31,7 @@ public class ContentTemplateHandler : ContentHandlerBase tracker, - AppCaches appCaches, - SyncFileService syncFileService) - : base(entityService, logger, serializer, tracker, appCaches, syncFileService) + : base(shortStringHelper, entityService, logger, appCaches, serializer, syncItemFactory, syncFileService) { this.contentService = contentService; } diff --git a/uSync8.ContentEdition/Handlers/DictionaryHandler.cs b/uSync.ContentEdition/Handlers/DictionaryHandler.cs similarity index 85% rename from uSync8.ContentEdition/Handlers/DictionaryHandler.cs rename to uSync.ContentEdition/Handlers/DictionaryHandler.cs index ccb92960..c624fc84 100644 --- a/uSync8.ContentEdition/Handlers/DictionaryHandler.cs +++ b/uSync.ContentEdition/Handlers/DictionaryHandler.cs @@ -9,20 +9,21 @@ using Umbraco.Core.Models.Entities; using Umbraco.Core.Services; using Umbraco.Core.Services.Implement; - -using uSync8.BackOffice; -using uSync8.BackOffice.Configuration; -using uSync8.BackOffice.Services; -using uSync8.BackOffice.SyncHandlers; -using uSync8.Core; -using uSync8.Core.Dependency; -using uSync8.Core.Models; -using uSync8.Core.Serialization; -using uSync8.Core.Tracking; +using Umbraco.Core.Strings; + +using uSync.BackOffice; +using uSync.BackOffice.Configuration; +using uSync.BackOffice.Services; +using uSync.BackOffice.SyncHandlers; +using uSync.Core; +using uSync.Core.Dependency; +using uSync.Core.Models; +using uSync.Core.Serialization; +using uSync.Core.Tracking; using static Umbraco.Core.Constants; -namespace uSync8.ContentEdition.Handlers +namespace uSync.ContentEdition.Handlers { [SyncHandler("dictionaryHandler", "Dictionary", "Dictionary", uSyncBackOfficeConstants.Priorites.DictionaryItems , Icon = "icon-book-alt usync-addon-icon", EntityType = UdiEntityType.DictionaryItem)] @@ -33,6 +34,7 @@ public class DictionaryHandler : SyncHandlerLevelBase serializer, ISyncItemFactory syncItemFactory, SyncFileService syncFileService) - : base(entityService, logger, appCaches, serializer, syncItemFactory, syncFileService) - { - this.localizationService = localizationService; - } - - [Obsolete("Use constructors with collections")] - protected DictionaryHandler(IEntityService entityService, - IProfilingLogger logger, - ILocalizationService localizationService, - ISyncSerializer serializer, - ISyncTracker tracker, - AppCaches appCaches, - ISyncDependencyChecker checker, - SyncFileService syncFileService) - : base(entityService, logger, serializer, tracker, appCaches, checker, syncFileService) + : base(shortStringHelper, entityService, logger, appCaches, serializer, syncItemFactory, syncFileService) { this.localizationService = localizationService; } @@ -167,7 +155,7 @@ protected override string GetItemName(IDictionaryItem item) => item.ItemKey; protected override string GetItemPath(IDictionaryItem item, bool useGuid, bool isFlat) - => item.ItemKey.ToSafeFileName(); + => item.ItemKey.ToSafeFileName(shortStringHelper); protected override void InitializeEvents(HandlerSettings settings) { diff --git a/uSync8.ContentEdition/Handlers/DomainHandler.cs b/uSync.ContentEdition/Handlers/DomainHandler.cs similarity index 73% rename from uSync8.ContentEdition/Handlers/DomainHandler.cs rename to uSync.ContentEdition/Handlers/DomainHandler.cs index 55fb8f1d..bbacd394 100644 --- a/uSync8.ContentEdition/Handlers/DomainHandler.cs +++ b/uSync.ContentEdition/Handlers/DomainHandler.cs @@ -9,17 +9,18 @@ using Umbraco.Core.Models.Entities; using Umbraco.Core.Services; using Umbraco.Core.Services.Implement; - -using uSync8.BackOffice; -using uSync8.BackOffice.Configuration; -using uSync8.BackOffice.Services; -using uSync8.BackOffice.SyncHandlers; -using uSync8.Core; -using uSync8.Core.Dependency; -using uSync8.Core.Serialization; -using uSync8.Core.Tracking; - -namespace uSync8.ContentEdition.Handlers +using Umbraco.Core.Strings; + +using uSync.BackOffice; +using uSync.BackOffice.Configuration; +using uSync.BackOffice.Services; +using uSync.BackOffice.SyncHandlers; +using uSync.Core; +using uSync.Core.Dependency; +using uSync.Core.Serialization; +using uSync.Core.Tracking; + +namespace uSync.ContentEdition.Handlers { [SyncHandler("domainHandler", "Domains", "Domains", uSyncBackOfficeConstants.Priorites.DomainSettings , Icon = "icon-home usync-addon-icon", EntityType = "domain")] @@ -30,6 +31,7 @@ public class DomainHandler : SyncHandlerBase, ISyncHand private readonly IDomainService domainService; public DomainHandler( + IShortStringHelper shortStringHelper, IDomainService domainService, IEntityService entityService, IProfilingLogger logger, @@ -37,22 +39,7 @@ public DomainHandler( ISyncSerializer serializer, ISyncItemFactory syncItemFactory, SyncFileService syncFileService) - : base(entityService, logger, appCaches, serializer, syncItemFactory, syncFileService) - { - this.domainService = domainService; - } - - - [Obsolete("Use constructors with collections")] - protected DomainHandler(IEntityService entityService, - IProfilingLogger logger, - IDomainService domainService, - ISyncSerializer serializer, - ISyncTracker tracker, - AppCaches appCaches, - ISyncDependencyChecker checker, - SyncFileService syncFileService) - : base(entityService, logger, serializer, tracker, appCaches, checker, syncFileService) + : base(shortStringHelper, entityService, logger, appCaches, serializer, syncItemFactory, syncFileService) { this.domainService = domainService; } @@ -96,7 +83,7 @@ protected override string GetItemName(IDomain item) => item.DomainName; protected override string GetItemPath(IDomain item, bool useGuid, bool isFlat) - => $"{item.DomainName.ToSafeFileName()}_{item.LanguageIsoCode.ToSafeFileName()}"; + => $"{item.DomainName.ToSafeFileName(shortStringHelper)}_{item.LanguageIsoCode.ToSafeFileName(shortStringHelper)}"; protected override void InitializeEvents(HandlerSettings settings) { diff --git a/uSync8.ContentEdition/Handlers/MediaHandler.cs b/uSync.ContentEdition/Handlers/MediaHandler.cs similarity index 50% rename from uSync8.ContentEdition/Handlers/MediaHandler.cs rename to uSync.ContentEdition/Handlers/MediaHandler.cs index 0dc11859..d4956182 100644 --- a/uSync8.ContentEdition/Handlers/MediaHandler.cs +++ b/uSync.ContentEdition/Handlers/MediaHandler.cs @@ -5,19 +5,20 @@ using Umbraco.Core.Models; using Umbraco.Core.Services; using Umbraco.Core.Services.Implement; +using Umbraco.Core.Strings; -using uSync8.BackOffice; -using uSync8.BackOffice.Configuration; -using uSync8.BackOffice.Services; -using uSync8.BackOffice.SyncHandlers; -using uSync8.Core; -using uSync8.Core.Dependency; -using uSync8.Core.Serialization; -using uSync8.Core.Tracking; +using uSync.BackOffice; +using uSync.BackOffice.Configuration; +using uSync.BackOffice.Services; +using uSync.BackOffice.SyncHandlers; +using uSync.Core; +using uSync.Core.Dependency; +using uSync.Core.Serialization; +using uSync.Core.Tracking; using static Umbraco.Core.Constants; -namespace uSync8.ContentEdition.Handlers +namespace uSync.ContentEdition.Handlers { [SyncHandler("mediaHandler", "Media", "Media", uSyncBackOfficeConstants.Priorites.Media, Icon = "icon-picture usync-addon-icon", IsTwoPass = true, EntityType = UdiEntityType.Media)] @@ -27,9 +28,8 @@ public class MediaHandler : ContentHandlerBase, ISyncHand private readonly IMediaService mediaService; - private readonly bool performDoubleLookup; - public MediaHandler( + IShortStringHelper shortStringHelper, IMediaService mediaService, IEntityService entityService, IProfilingLogger logger, @@ -37,28 +37,9 @@ public MediaHandler( ISyncSerializer serializer, ISyncItemFactory syncItemFactory, SyncFileService syncFileService) - : base(entityService, logger, appCaches, serializer, syncItemFactory, syncFileService) + : base(shortStringHelper, entityService, logger, appCaches, serializer, syncItemFactory, syncFileService) { this.mediaService = mediaService; - performDoubleLookup = UmbracoVersion.LocalVersion.Major != 8 || UmbracoVersion.LocalVersion.Minor < 4; - - } - - [Obsolete("Use constructors with collections")] - protected MediaHandler( - IEntityService entityService, - IProfilingLogger logger, - IMediaService mediaService, - ISyncSerializer serializer, - ISyncTracker tracker, - AppCaches appCaches, - ISyncDependencyChecker checker, - SyncFileService syncFileService) - : base(entityService, logger, serializer, tracker, appCaches, checker, syncFileService) - { - this.mediaService = mediaService; - performDoubleLookup = UmbracoVersion.LocalVersion.Major != 8 || UmbracoVersion.LocalVersion.Minor < 4; - } protected override void DeleteViaService(IMedia item) @@ -68,22 +49,7 @@ protected override IMedia GetFromService(int id) => mediaService.GetById(id); protected override IMedia GetFromService(Guid key) - { - if (performDoubleLookup) - { - // fixed v8.4+ by https://github.com/umbraco/Umbraco-CMS/issues/2997 - var entity = entityService.Get(key); - if (entity != null) - return mediaService.GetById(entity.Id); - } - else - { - return mediaService.GetById(key); - } - - return null; - } - + => mediaService.GetById(key); protected override IMedia GetFromService(string alias) => null; diff --git a/uSync8.ContentEdition/Handlers/RelationTypeHandler.cs b/uSync.ContentEdition/Handlers/RelationTypeHandler.cs similarity index 91% rename from uSync8.ContentEdition/Handlers/RelationTypeHandler.cs rename to uSync.ContentEdition/Handlers/RelationTypeHandler.cs index 43f712f7..6bd29555 100644 --- a/uSync8.ContentEdition/Handlers/RelationTypeHandler.cs +++ b/uSync.ContentEdition/Handlers/RelationTypeHandler.cs @@ -14,20 +14,21 @@ using Umbraco.Core.Models; using Umbraco.Core.Services; using Umbraco.Core.Services.Implement; - -using uSync8.BackOffice; -using uSync8.BackOffice.Configuration; -using uSync8.BackOffice.Services; -using uSync8.BackOffice.SyncHandlers; -using uSync8.Core; -using uSync8.Core.Dependency; -using uSync8.Core.Extensions; -using uSync8.Core.Serialization; -using uSync8.Core.Tracking; +using Umbraco.Core.Strings; + +using uSync.BackOffice; +using uSync.BackOffice.Configuration; +using uSync.BackOffice.Services; +using uSync.BackOffice.SyncHandlers; +using uSync.Core; +using uSync.Core.Dependency; +using uSync.Core.Extensions; +using uSync.Core.Serialization; +using uSync.Core.Tracking; using static Umbraco.Core.Constants; -namespace uSync8.ContentEdition.Handlers +namespace uSync.ContentEdition.Handlers { [SyncHandler("relationTypeHandler", "Relations", "RelationTypes", uSyncBackOfficeConstants.Priorites.RelationTypes, @@ -40,6 +41,7 @@ public class RelationTypeHandler : SyncHandlerBase uSyncBackOfficeConstants.Groups.Content; public RelationTypeHandler( + IShortStringHelper shortStringHelper, IRelationService relationService, IEntityService entityService, IProfilingLogger logger, @@ -47,7 +49,7 @@ public RelationTypeHandler( ISyncSerializer serializer, ISyncItemFactory syncItemFactory, SyncFileService syncFileService) - : base(entityService, logger, appCaches, serializer, syncItemFactory, syncFileService) + : base(shortStringHelper, entityService, logger, appCaches, serializer, syncItemFactory, syncFileService) { this.relationService = relationService; } @@ -108,7 +110,7 @@ protected override string GetItemName(IRelationType item) => item.Name; protected override string GetItemPath(IRelationType item, bool useGuid, bool isFlat) - => useGuid ? item.Key.ToString() : item.Alias.ToSafeAlias(); + => useGuid ? item.Key.ToString() : item.Alias.ToSafeAlias(shortStringHelper); protected override void InitializeEvents(HandlerSettings settings) { @@ -135,7 +137,7 @@ protected override void InitializeEvents(HandlerSettings settings) private void RelationService_SavedRelation(IRelationService sender, Umbraco.Core.Events.SaveEventArgs e) { - if (uSync8BackOffice.eventsPaused) return; + if (uSyncBackOffice.eventsPaused) return; lock (saveLock) { @@ -166,7 +168,7 @@ private void SaveTimer_Elapsed(object sender, ElapsedEventArgs e) private void RelationService_DeletedRelation(IRelationService sender, Umbraco.Core.Events.DeleteEventArgs e) { - if (uSync8BackOffice.eventsPaused) return; + if (uSyncBackOffice.eventsPaused) return; var types = new List(); diff --git a/uSync8.ContentEdition/Mapping/ISyncMapper.cs b/uSync.ContentEdition/Mapping/ISyncMapper.cs similarity index 87% rename from uSync8.ContentEdition/Mapping/ISyncMapper.cs rename to uSync.ContentEdition/Mapping/ISyncMapper.cs index b1ebbaf3..f9efca35 100644 --- a/uSync8.ContentEdition/Mapping/ISyncMapper.cs +++ b/uSync.ContentEdition/Mapping/ISyncMapper.cs @@ -2,9 +2,9 @@ using Umbraco.Core.Models; -using uSync8.Core.Dependency; +using uSync.Core.Dependency; -namespace uSync8.ContentEdition.Mapping +namespace uSync.ContentEdition.Mapping { public interface ISyncMapper { diff --git a/uSync.ContentEdition/Mapping/Mappers/BlockListMapper.cs b/uSync.ContentEdition/Mapping/Mappers/BlockListMapper.cs new file mode 100644 index 00000000..0a794725 --- /dev/null +++ b/uSync.ContentEdition/Mapping/Mappers/BlockListMapper.cs @@ -0,0 +1,101 @@ +using System.Collections.Generic; +using System.Linq; + +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; + +using Umbraco.Core.Services; + +using uSync.Core; +using uSync.Core.Dependency; + +namespace uSync.ContentEdition.Mapping.Mappers +{ + public class BlockListMapper : SyncNestedValueMapperBase, ISyncMapper + { + private readonly string docTypeKeyAlias = "contentTypeKey"; + private readonly string[] contentBlocks = new string[] + { + "contentData", "settingsData" + }; + + public BlockListMapper(IEntityService entityService, + SyncValueMapperFactory mapperFactory, + IContentTypeService contentTypeService, + IDataTypeService dataTypeService) + : base(entityService, mapperFactory, contentTypeService, dataTypeService) + {} + + public override string Name => "Block List Mapper"; + + public override string[] Editors => new string[] + { + "Umbraco.BlockList" + }; + + public override string GetExportValue(object value, string editorAlias) + { + if (value == null) return string.Empty; + + var jsonValue = GetJsonValue(value); + if (jsonValue == null) return value.ToString(); + + foreach (var block in contentBlocks) + { + if (jsonValue.ContainsKey(block)) + { + var contentData = jsonValue.Value(block); + if (contentData == null) continue; + + foreach (var item in contentData.Cast()) + { + var doctype = GetDocTypeByKey(item, docTypeKeyAlias); + if (doctype == null) continue; + + GetExportProperties(item, doctype); + } + + } + return JsonConvert.SerializeObject(jsonValue, Formatting.Indented); + } + + return value.ToString(); + + } + + public override IEnumerable GetDependencies(object value, string editorAlias, DependencyFlags flags) + { + var jsonValue = GetJsonValue(value); + if (jsonValue == null) return Enumerable.Empty(); + + + var dependencies = new List(); + + // format of block data. + // { "layout" : {}, "contentData": {}, "settingsData": {} } + + foreach (var block in contentBlocks) + { + // contentData is the thing we need to inspect. + if (jsonValue.ContainsKey(block)) + { + var contentData = jsonValue.Value(block); + if (contentData != null) + { + foreach (var contentItem in contentData.Cast()) + { + var contentType = GetDocTypeByKey(contentItem, this.docTypeKeyAlias); + if (contentType != null) + { + dependencies.AddNotNull(CreateDocTypeDependency(contentType, flags)); + dependencies.AddRange(this.GetPropertyDependencies(contentItem, contentType, flags)); + } + } + } + } + } + + return dependencies; + } + } +} diff --git a/uSync8.ContentEdition/Mapping/Mappers/DateMapper.cs b/uSync.ContentEdition/Mapping/Mappers/DateMapper.cs similarity index 83% rename from uSync8.ContentEdition/Mapping/Mappers/DateMapper.cs rename to uSync.ContentEdition/Mapping/Mappers/DateMapper.cs index 3ca9b88b..97aca477 100644 --- a/uSync8.ContentEdition/Mapping/Mappers/DateMapper.cs +++ b/uSync.ContentEdition/Mapping/Mappers/DateMapper.cs @@ -2,7 +2,7 @@ using Umbraco.Core.Services; -namespace uSync8.ContentEdition.Mapping.Mappers +namespace uSync.ContentEdition.Mapping.Mappers { /// /// DateTime Mapper @@ -14,8 +14,9 @@ namespace uSync8.ContentEdition.Mapping.Mappers /// public class DateTimeMapper : SyncValueMapperBase, ISyncMapper { - public DateTimeMapper(IEntityService entityService) - : base(entityService) { } + public DateTimeMapper(IEntityService entityService, + SyncValueMapperFactory mapperFactory) + : base(entityService, mapperFactory) { } public override string Name => "Custom DateTimeMapper"; diff --git a/uSync8.ContentEdition/Mapping/Mappers/GridImageMapper.cs b/uSync.ContentEdition/Mapping/Mappers/GridImageMapper.cs similarity index 83% rename from uSync8.ContentEdition/Mapping/Mappers/GridImageMapper.cs rename to uSync.ContentEdition/Mapping/Mappers/GridImageMapper.cs index d50f7258..81908bda 100644 --- a/uSync8.ContentEdition/Mapping/Mappers/GridImageMapper.cs +++ b/uSync.ContentEdition/Mapping/Mappers/GridImageMapper.cs @@ -7,13 +7,14 @@ using Umbraco.Core; using Umbraco.Core.Services; -using uSync8.Core.Dependency; +using uSync.Core.Dependency; -namespace uSync8.ContentEdition.Mapping.Mappers +namespace uSync.ContentEdition.Mapping.Mappers { public class GridImageMapper : SyncValueMapperBase, ISyncMapper { - public GridImageMapper(IEntityService entityService) : base(entityService) + public GridImageMapper(IEntityService entityService, + SyncValueMapperFactory mapperFactory) : base(entityService, mapperFactory) { } diff --git a/uSync8.ContentEdition/Mapping/Mappers/GridMapper.cs b/uSync.ContentEdition/Mapping/Mappers/GridMapper.cs similarity index 96% rename from uSync8.ContentEdition/Mapping/Mappers/GridMapper.cs rename to uSync.ContentEdition/Mapping/Mappers/GridMapper.cs index 5450c5cc..77572911 100644 --- a/uSync8.ContentEdition/Mapping/Mappers/GridMapper.cs +++ b/uSync.ContentEdition/Mapping/Mappers/GridMapper.cs @@ -8,9 +8,9 @@ using Umbraco.Core; using Umbraco.Core.Services; -using uSync8.Core.Dependency; +using uSync.Core.Dependency; -namespace uSync8.ContentEdition.Mapping.Mappers +namespace uSync.ContentEdition.Mapping.Mappers { /// /// mapper for the grid @@ -27,7 +27,7 @@ namespace uSync8.ContentEdition.Mapping.Mappers /// public class GridMapper : SyncValueMapperBase, ISyncMapper { - public GridMapper(IEntityService entityService) : base(entityService) + public GridMapper(IEntityService entityService, SyncValueMapperFactory mapperFactory) : base(entityService, mapperFactory) { } public override string Name => "Grid Mapper"; @@ -198,7 +198,7 @@ private IEnumerable GetGridDependencies(string gridContent, Fu { var alias = $"{Constants.PropertyEditors.Aliases.Grid}.{editor.Value("alias")}"; - var mappers = SyncValueMapperFactory.GetMappers(alias); + var mappers = mapperFactory.GetMappers(alias); if (mappers.Any()) return (alias, mappers); // look based on the view @@ -211,7 +211,7 @@ private IEnumerable GetGridDependencies(string gridContent, Fu viewAlias = viewAlias.Substring(viewAlias.LastIndexOf('/') + 1); alias = $"{Constants.PropertyEditors.Aliases.Grid}.{viewAlias}"; - return (alias, SyncValueMapperFactory.GetMappers(alias)); + return (alias, mapperFactory.GetMappers(alias)); } private JArray GetArray(JObject obj, string propertyName) diff --git a/uSync8.ContentEdition/Mapping/Mappers/ImagePathMapper.cs b/uSync.ContentEdition/Mapping/Mappers/ImagePathMapper.cs similarity index 96% rename from uSync8.ContentEdition/Mapping/Mappers/ImagePathMapper.cs rename to uSync.ContentEdition/Mapping/Mappers/ImagePathMapper.cs index 14d75559..fc291a88 100644 --- a/uSync8.ContentEdition/Mapping/Mappers/ImagePathMapper.cs +++ b/uSync.ContentEdition/Mapping/Mappers/ImagePathMapper.cs @@ -14,10 +14,12 @@ using Umbraco.Core.Models; using Umbraco.Core.Services; -using uSync8.BackOffice.Configuration; -using uSync8.Core.Dependency; +using uSync.BackOffice.Configuration; +using uSync.Core.Dependency; -namespace uSync8.ContentEdition.Mapping.Mappers +using static Umbraco.Core.Constants; + +namespace uSync.ContentEdition.Mapping.Mappers { /// /// Mapper for file path in an image cropper / upload control @@ -37,11 +39,13 @@ public class ImagePathMapper : SyncValueMapperBase, ISyncMapper private readonly IProfilingLogger logger; public ImagePathMapper(IEntityService entityService, - IProfilingLogger logger, uSyncConfig config) : base(entityService) + SyncValueMapperFactory mapperFactory, + IProfilingLogger logger, uSyncConfig config) : base(entityService, mapperFactory) { this.logger = logger; - siteRoot = SystemDirectories.Root; + // siteRoot = SystemDirectories.Root; + siteRoot = ""; mediaFolder = GetMediaFolderSetting(config); if (!string.IsNullOrWhiteSpace(mediaFolder)) diff --git a/uSync8.ContentEdition/Mapping/Mappers/MacroMapper.cs b/uSync.ContentEdition/Mapping/Mappers/MacroMapper.cs similarity index 95% rename from uSync8.ContentEdition/Mapping/Mappers/MacroMapper.cs rename to uSync.ContentEdition/Mapping/Mappers/MacroMapper.cs index ccb3dc42..f160830e 100644 --- a/uSync8.ContentEdition/Mapping/Mappers/MacroMapper.cs +++ b/uSync.ContentEdition/Mapping/Mappers/MacroMapper.cs @@ -8,9 +8,9 @@ using Umbraco.Core; using Umbraco.Core.Services; -using uSync8.Core.Dependency; +using uSync.Core.Dependency; -namespace uSync8.ContentEdition.Mapping.Mappers +namespace uSync.ContentEdition.Mapping.Mappers { public class MacroMapper : SyncValueMapperBase, ISyncMapper { @@ -25,8 +25,9 @@ public class MacroMapper : SyncValueMapperBase, ISyncMapper }; public MacroMapper(IEntityService entityService, + SyncValueMapperFactory mapperFactory, IMacroService macroService) - : base(entityService) + : base(entityService, mapperFactory) { this.macroService = macroService; } diff --git a/uSync8.ContentEdition/Mapping/Mappers/MultiUrlMapper.cs b/uSync.ContentEdition/Mapping/Mappers/MultiUrlMapper.cs similarity index 87% rename from uSync8.ContentEdition/Mapping/Mappers/MultiUrlMapper.cs rename to uSync.ContentEdition/Mapping/Mappers/MultiUrlMapper.cs index d6206b25..c6cabbde 100644 --- a/uSync8.ContentEdition/Mapping/Mappers/MultiUrlMapper.cs +++ b/uSync.ContentEdition/Mapping/Mappers/MultiUrlMapper.cs @@ -7,13 +7,14 @@ using Umbraco.Core; using Umbraco.Core.Services; -using uSync8.Core.Dependency; +using uSync.Core.Dependency; -namespace uSync8.ContentEdition.Mapping.Mappers +namespace uSync.ContentEdition.Mapping.Mappers { public class MultiUrlMapper : SyncValueMapperBase, ISyncMapper { - public MultiUrlMapper(IEntityService entityService) : base(entityService) + public MultiUrlMapper(IEntityService entityService, + SyncValueMapperFactory mapperFactory) : base(entityService, mapperFactory) { } diff --git a/uSync8.ContentEdition/Mapping/Mappers/NestedContentMapper.cs b/uSync.ContentEdition/Mapping/Mappers/NestedContentMapper.cs similarity index 92% rename from uSync8.ContentEdition/Mapping/Mappers/NestedContentMapper.cs rename to uSync.ContentEdition/Mapping/Mappers/NestedContentMapper.cs index 97048588..c3d1e827 100644 --- a/uSync8.ContentEdition/Mapping/Mappers/NestedContentMapper.cs +++ b/uSync.ContentEdition/Mapping/Mappers/NestedContentMapper.cs @@ -7,18 +7,19 @@ using Umbraco.Core; using Umbraco.Core.Services; -using uSync8.Core.Dependency; +using uSync.Core.Dependency; -namespace uSync8.ContentEdition.Mapping.Mappers +namespace uSync.ContentEdition.Mapping.Mappers { public class NestedContentMapper : SyncNestedValueMapperBase, ISyncMapper { private readonly string docTypeAliasValue = "ncContentTypeAlias"; public NestedContentMapper( IEntityService entityService, + SyncValueMapperFactory mapperFactory, IContentTypeService contentTypeService, IDataTypeService dataTypeService) - : base(entityService, contentTypeService, dataTypeService) + : base(entityService, mapperFactory, contentTypeService, dataTypeService) { } public override string Name => "Nested Content Mapper"; @@ -44,7 +45,7 @@ public override string GetExportValue(object value, string editorAlias) GetExportProperties(item, docType); } - return JsonConvert.SerializeObject(nestedJson, Formatting.None); + return JsonConvert.SerializeObject(nestedJson, Formatting.Indented); } public override IEnumerable GetDependencies(object value, string editorAlias, DependencyFlags flags) diff --git a/uSync8.ContentEdition/Mapping/Mappers/RTEMapper.cs b/uSync.ContentEdition/Mapping/Mappers/RTEMapper.cs similarity index 88% rename from uSync8.ContentEdition/Mapping/Mappers/RTEMapper.cs rename to uSync.ContentEdition/Mapping/Mappers/RTEMapper.cs index 3345789a..e5a14e39 100644 --- a/uSync8.ContentEdition/Mapping/Mappers/RTEMapper.cs +++ b/uSync.ContentEdition/Mapping/Mappers/RTEMapper.cs @@ -5,9 +5,9 @@ using Umbraco.Core; using Umbraco.Core.Services; -using uSync8.Core.Dependency; +using uSync.Core.Dependency; -namespace uSync8.ContentEdition.Mapping.Mappers +namespace uSync.ContentEdition.Mapping.Mappers { /// /// mapper for the tinyMCE editor @@ -27,7 +27,7 @@ public class RTEMapper : SyncValueMapperBase, ISyncMapper private Regex MacroRegEx = new Regex("<\\?UMBRACO_MACRO[^>]*>", RegexOptions.IgnoreCase | RegexOptions.IgnorePatternWhitespace); - public RTEMapper(IEntityService entityService) : base(entityService) + public RTEMapper(IEntityService entityService, SyncValueMapperFactory mapperFactory) : base(entityService, mapperFactory) { } @@ -50,7 +50,7 @@ public override IEnumerable GetDependencies(object value, strin foreach (Match m in UdiRegEx.Matches(stringValue)) { - if (GuidUdi.TryParse(m.Value, out GuidUdi udi)) + if (UdiParser.TryParse(m.Value, out GuidUdi udi)) { if (!dependencies.Any(x => x.Udi == udi)) dependencies.Add(CreateDependency(udi, flags)); @@ -59,7 +59,7 @@ public override IEnumerable GetDependencies(object value, strin if (MacroRegEx.IsMatch(stringValue)) { - var mappers = SyncValueMapperFactory.GetMappers(editorAlias + ".macro"); + var mappers = mapperFactory.GetMappers(editorAlias + ".macro"); if (mappers.Any()) { foreach (var macro in MacroRegEx.Matches(stringValue)) diff --git a/uSync8.ContentEdition/Mapping/Mappers/RepeatableValueMapper.cs b/uSync.ContentEdition/Mapping/Mappers/RepeatableValueMapper.cs similarity index 85% rename from uSync8.ContentEdition/Mapping/Mappers/RepeatableValueMapper.cs rename to uSync.ContentEdition/Mapping/Mappers/RepeatableValueMapper.cs index 7241678d..32b92944 100644 --- a/uSync8.ContentEdition/Mapping/Mappers/RepeatableValueMapper.cs +++ b/uSync.ContentEdition/Mapping/Mappers/RepeatableValueMapper.cs @@ -6,15 +6,16 @@ using Newtonsoft.Json.Linq; using Umbraco.Core.Services; -namespace uSync8.ContentEdition.Mapping.Mappers +namespace uSync.ContentEdition.Mapping.Mappers { /// /// restore the /r/n to the string when the xml strips it out :( /// public class RepeatableValueMapper : SyncValueMapperBase, ISyncMapper { - public RepeatableValueMapper(IEntityService entityService) - : base(entityService) + public RepeatableValueMapper(IEntityService entityService, + SyncValueMapperFactory mapperFactory) + : base(entityService, mapperFactory) { } public override string Name => "Repeatable Text Mapper"; diff --git a/uSync8.ContentEdition/Mapping/Mappers/UdiPickerMapper.cs b/uSync.ContentEdition/Mapping/Mappers/UdiPickerMapper.cs similarity index 87% rename from uSync8.ContentEdition/Mapping/Mappers/UdiPickerMapper.cs rename to uSync.ContentEdition/Mapping/Mappers/UdiPickerMapper.cs index e4e0a54f..a1c3ee3b 100644 --- a/uSync8.ContentEdition/Mapping/Mappers/UdiPickerMapper.cs +++ b/uSync.ContentEdition/Mapping/Mappers/UdiPickerMapper.cs @@ -3,9 +3,9 @@ using Umbraco.Core; using Umbraco.Core.Services; -using uSync8.Core.Dependency; +using uSync.Core.Dependency; -namespace uSync8.ContentEdition.Mapping +namespace uSync.ContentEdition.Mapping { /// /// Mapper for anything that just stores a single or @@ -22,7 +22,9 @@ namespace uSync8.ContentEdition.Mapping /// public class UdiPickerMapper : SyncValueMapperBase, ISyncMapper { - public UdiPickerMapper(IEntityService entityService) : base(entityService) + public UdiPickerMapper(IEntityService entityService, + SyncValueMapperFactory mapperFactory) + : base(entityService, mapperFactory) { } diff --git a/uSync8.ContentEdition/Mapping/SyncNestedValueMapperBase.cs b/uSync.ContentEdition/Mapping/SyncNestedValueMapperBase.cs similarity index 77% rename from uSync8.ContentEdition/Mapping/SyncNestedValueMapperBase.cs rename to uSync.ContentEdition/Mapping/SyncNestedValueMapperBase.cs index 2b4d7afc..bbfbf048 100644 --- a/uSync8.ContentEdition/Mapping/SyncNestedValueMapperBase.cs +++ b/uSync.ContentEdition/Mapping/SyncNestedValueMapperBase.cs @@ -1,5 +1,7 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; using System.Linq; + using Newtonsoft.Json; using Newtonsoft.Json.Linq; @@ -7,9 +9,9 @@ using Umbraco.Core.Models; using Umbraco.Core.Services; -using uSync8.Core.Dependency; +using uSync.Core.Dependency; -namespace uSync8.ContentEdition.Mapping +namespace uSync.ContentEdition.Mapping { /// /// a base class for properties that nest other content items inside them @@ -24,9 +26,10 @@ public abstract class SyncNestedValueMapperBase : SyncValueMapperBase protected readonly IDataTypeService dataTypeService; public SyncNestedValueMapperBase(IEntityService entityService, + SyncValueMapperFactory mapperFactory, IContentTypeService contentTypeService, IDataTypeService dataTypeService) - : base(entityService) + : base(entityService, mapperFactory) { this.contentTypeService = contentTypeService; this.dataTypeService = dataTypeService; @@ -37,14 +40,14 @@ public SyncNestedValueMapperBase(IEntityService entityService, /// protected JObject GetExportProperties(JObject item, IContentType docType) { - foreach(var property in docType.CompositionPropertyTypes) + foreach (var property in docType.CompositionPropertyTypes) { if (item.ContainsKey(property.Alias)) { var value = item[property.Alias]; if (value != null) { - var mappedVal = SyncValueMapperFactory.GetExportValue(value, property.PropertyEditorAlias); + var mappedVal = mapperFactory.GetExportValue(value, property.PropertyEditorAlias); if (mappedVal.DetectIsJson()) { item[property.Alias] = JToken.Parse(mappedVal); @@ -73,7 +76,7 @@ protected IEnumerable GetPropertyDependencies(JObject value, var dataType = dataTypeService.GetDataType(propertyType.DataTypeKey); if (dataType == null) continue; - return SyncValueMapperFactory.GetDependencies(propertyValue, dataType.EditorAlias, flags); + return mapperFactory.GetDependencies(propertyValue, dataType.EditorAlias, flags); } return dependencies; @@ -92,7 +95,7 @@ protected IEnumerable GetPropertyDependencies( { foreach (var property in properties) { - dependencies.AddRange(SyncValueMapperFactory.GetDependencies(property.Value, property.Key, flags)); + dependencies.AddRange(mapperFactory.GetDependencies(property.Value, property.Key, flags)); } } @@ -108,7 +111,17 @@ protected uSyncDependency CreateDocTypeDependency(string alias, DependencyFlags var item = contentTypeService.Get(alias); if (item != null) { - return new uSyncDependency() + return CreateDocTypeDependency(item, flags); + } + + return null; + } + + protected uSyncDependency CreateDocTypeDependency(IContentType item, DependencyFlags flags) + { + if (item != null) + { + new uSyncDependency { Name = item.Name, Udi = item.GetUdi(), @@ -121,6 +134,7 @@ protected uSyncDependency CreateDocTypeDependency(string alias, DependencyFlags return null; } + protected JObject GetJsonValue(object value) { var stringValue = GetValueAs(value); @@ -143,6 +157,20 @@ protected IContentType GetDocType(JObject json, string alias) return default; } + protected IContentType GetDocTypeByKey(JObject json, string keyAlias) + { + if (json.ContainsKey(keyAlias)) + { + var attempt = json[keyAlias].TryConvertTo(); + if (attempt.Success) + { + return contentTypeService.Get(attempt.Result); + } + } + + return default; + } + protected IContentType GetDocType(string alias) { if (string.IsNullOrWhiteSpace(alias)) return default; diff --git a/uSync8.ContentEdition/Mapping/SyncValueMapperBase.cs b/uSync.ContentEdition/Mapping/SyncValueMapperBase.cs similarity index 88% rename from uSync8.ContentEdition/Mapping/SyncValueMapperBase.cs rename to uSync.ContentEdition/Mapping/SyncValueMapperBase.cs index ccc7fba8..543f1a20 100644 --- a/uSync8.ContentEdition/Mapping/SyncValueMapperBase.cs +++ b/uSync.ContentEdition/Mapping/SyncValueMapperBase.cs @@ -6,17 +6,20 @@ using Umbraco.Core.Models.Entities; using Umbraco.Core.Services; -using uSync8.Core.Dependency; +using uSync.Core.Dependency; -namespace uSync8.ContentEdition.Mapping +namespace uSync.ContentEdition.Mapping { public abstract class SyncValueMapperBase { protected readonly IEntityService entityService; + protected readonly SyncValueMapperFactory mapperFactory; - public SyncValueMapperBase(IEntityService entityService) + public SyncValueMapperBase(IEntityService entityService, + SyncValueMapperFactory mapperFactory) { this.entityService = entityService; + this.mapperFactory = mapperFactory; } public abstract string Name { get; } @@ -50,7 +53,7 @@ protected IEnumerable CreateDependencies(IEnumerable ud protected uSyncDependency CreateDependency(string udiString, DependencyFlags flags) { - if (GuidUdi.TryParse(udiString, out GuidUdi udi)) + if (UdiParser.TryParse(udiString, out GuidUdi udi)) { return CreateDependency(udi, flags); } diff --git a/uSync8.ContentEdition/Mapping/SyncValueMapperCollection.cs b/uSync.ContentEdition/Mapping/SyncValueMapperCollection.cs similarity index 65% rename from uSync8.ContentEdition/Mapping/SyncValueMapperCollection.cs rename to uSync.ContentEdition/Mapping/SyncValueMapperCollection.cs index 91ff8ae9..ea0a2040 100644 --- a/uSync8.ContentEdition/Mapping/SyncValueMapperCollection.cs +++ b/uSync.ContentEdition/Mapping/SyncValueMapperCollection.cs @@ -2,41 +2,48 @@ using System.Collections.Generic; using System.Linq; +using Serilog.Formatting.Compact; + using Umbraco.Core; using Umbraco.Core.Composing; using Umbraco.Core.Models; -namespace uSync8.ContentEdition.Mapping +using uSync.BackOffice.Configuration; + +namespace uSync.ContentEdition.Mapping { public class SyncValueMapperCollection : BuilderCollectionBase { + private readonly IDictionary CustomMappings; - public SyncValueMapperCollection(IEnumerable items) - : base(items) { } - - [Obsolete("Request all mappers and you can chain multiple mappers")] - public ISyncMapper GetSyncMapper(string alias) + public SyncValueMapperCollection( + uSyncConfig uSyncConfig, + IEnumerable items) + : base(items) { - return this.FirstOrDefault(x => x.Editors.InvariantContains(alias)); + CustomMappings = uSyncConfig.Settings.CustomMappings; } - public IEnumerable GetSyncMappers(string alias) - => this.Where(x => x.Editors.InvariantContains(alias)); - - [Obsolete("Request all mappers and you can chain multiple mappers")] - public ISyncMapper GetSyncMapper(PropertyType propertyType) + /// + /// Returns the syncMappers assocated with the properyEditorAlias + /// + public IEnumerable GetSyncMappers(string editorAlias) { - return this.FirstOrDefault(x => x.IsMapper(propertyType)); + var mappedAlias = GetMapperAlias(editorAlias); + return this.Where(x => x.Editors.InvariantContains(mappedAlias)); } + /// + /// Get the mapped export value + /// public string GetExportValue(object value, string editorAlias) { if (value == null) return string.Empty; var mappers = GetSyncMappers(editorAlias); - if (mappers.Any()) - { + if (mappers.Any()) + { var mappedValue = value.ToString(); foreach (var mapper in mappers) { @@ -49,6 +56,9 @@ public string GetExportValue(object value, string editorAlias) return GetSafeValue(value); } + /// + /// Get the mapped import value + /// public object GetImportValue(string value, string editorAlias) { if (string.IsNullOrWhiteSpace(value)) return null; @@ -90,6 +100,29 @@ private string GetSafeValue(object value) return value.ToString(); } } + + /// + /// looks up the alias for a mapper (replacing it from settings if need be) + /// + private string GetMapperAlias(string alias) + { + if (CustomMappings.ContainsKey(alias.ToLower())) + return CustomMappings[alias.ToLower()]; + + return alias; + } + + + // Obsolete calls. + + [Obsolete("Request all mappers and you can chain multiple mappers")] + public ISyncMapper GetSyncMapper(PropertyType propertyType) + => this.FirstOrDefault(x => x.IsMapper(propertyType)); + + [Obsolete("Request all mappers and you can chain multiple mappers")] + public ISyncMapper GetSyncMapper(string alias) + => this.FirstOrDefault(x => x.Editors.InvariantContains(GetMapperAlias(alias))); + } public class SyncValueMapperCollectionBuilder diff --git a/uSync.ContentEdition/Mapping/SyncValueMapperFactory.cs b/uSync.ContentEdition/Mapping/SyncValueMapperFactory.cs new file mode 100644 index 00000000..ff5cbfaf --- /dev/null +++ b/uSync.ContentEdition/Mapping/SyncValueMapperFactory.cs @@ -0,0 +1,57 @@ +using System; +using System.Collections.Generic; +using System.Linq; + +using Umbraco.Core; +using Umbraco.Composing; + +using uSync.Core.Dependency; +using Umbraco.Core.Composing; + +namespace uSync.ContentEdition.Mapping +{ + public class SyncValueMapperFactory + { + private readonly IFactory factory; + + public SyncValueMapperFactory(IFactory factory) + { + this.factory = factory; + } + + public IEnumerable GetMappers(string editorAlias) + { + return factory + .GetInstance() + .GetSyncMappers(editorAlias); + } + + public string GetExportValue(object value, string editorAlias) + { + return factory + .GetInstance() + .GetExportValue(value, editorAlias); + } + + public object GetImportValue(string value, string editorAlias) + { + return factory + .GetInstance() + .GetImportValue(value, editorAlias); + } + + public IEnumerable GetDependencies(object value, string editorAlias, DependencyFlags flags) + { + var mappers = GetMappers(editorAlias); + if (!mappers.Any()) return Enumerable.Empty(); + + var dependencies = new List(); + foreach (var mapper in mappers) + { + dependencies.AddRange(mapper.GetDependencies(value, editorAlias, flags)); + } + return dependencies; + } + } + +} diff --git a/uSync8.ContentEdition/Serializers/ContentSerializer.cs b/uSync.ContentEdition/Serializers/ContentSerializer.cs similarity index 85% rename from uSync8.ContentEdition/Serializers/ContentSerializer.cs rename to uSync.ContentEdition/Serializers/ContentSerializer.cs index b4526607..d4dc30a1 100644 --- a/uSync8.ContentEdition/Serializers/ContentSerializer.cs +++ b/uSync.ContentEdition/Serializers/ContentSerializer.cs @@ -1,27 +1,24 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Runtime.CompilerServices; -using System.Web.WebPages; using System.Xml.Linq; -using NPoco.Expressions; - using Umbraco.Core; using Umbraco.Core.Configuration; using Umbraco.Core.Logging; using Umbraco.Core.Models; using Umbraco.Core.Models.Entities; using Umbraco.Core.Services; +using Umbraco.Core.Strings; -using uSync8.ContentEdition.Extensions; -using uSync8.ContentEdition.Mapping; -using uSync8.Core; -using uSync8.Core.Extensions; -using uSync8.Core.Models; -using uSync8.Core.Serialization; +using uSync.ContentEdition.Extensions; +using uSync.ContentEdition.Mapping; +using uSync.Core; +using uSync.Core.Extensions; +using uSync.Core.Models; +using uSync.Core.Serialization; -namespace uSync8.ContentEdition.Serializers +namespace uSync.ContentEdition.Serializers { [SyncSerializer("5CB57139-8AF7-4813-95AD-C075D74636C2", "ContentSerializer", uSyncConstants.Serialization.Content)] public class ContentSerializer : ContentSerializerBase, ISyncOptionsSerializer @@ -29,9 +26,8 @@ public class ContentSerializer : ContentSerializerBase, ISyncOptionsSe protected readonly IContentService contentService; protected readonly IFileService fileService; - private bool performDoubleLookup; - - public ContentSerializer( + public ContentSerializer( + IShortStringHelper shortStringHelper, IEntityService entityService, ILocalizationService localizationService, IRelationService relationService, @@ -39,14 +35,12 @@ public ContentSerializer( IContentService contentService, IFileService fileService, SyncValueMapperCollection syncMappers) - : base(entityService, localizationService, relationService, logger, UmbracoObjectTypes.Document, syncMappers) + : base(shortStringHelper, entityService, localizationService, relationService, logger, UmbracoObjectTypes.Document, syncMappers) { this.contentService = contentService; this.fileService = fileService; this.relationAlias = Constants.Conventions.RelationTypes.RelateParentDocumentOnDeleteAlias; - - performDoubleLookup = UmbracoVersion.LocalVersion.Major != 8 || UmbracoVersion.LocalVersion.Minor < 4; } #region Serialization @@ -117,7 +111,9 @@ protected virtual XElement SerializeSchedule(IContent item, SyncSerializerOption var schedules = item.ContentSchedule.FullSchedule; if (schedules != null) { - foreach (var schedule in schedules.OrderBy(x => x.Id)) + foreach (var schedule in schedules + .OrderBy(x => x.Action.ToString()) + .ThenBy(x => x.Culture)) { node.Add(new XElement("ContentSchedule", // new XAttribute("Key", schedule.Id), @@ -136,17 +132,21 @@ protected virtual XElement SerializeSchedule(IContent item, SyncSerializerOption protected override SyncAttempt DeserializeCore(XElement node, SyncSerializerOptions options) { + var attempt = FindOrCreate(node); + if (!attempt.Success) throw attempt.Exception; + + var item = attempt.Result; - var item = FindOrCreate(node); + var details = new List(); - DeserializeBase(item, node, options); - DeserializeTemplate(item, node); - DeserializeSchedules(item, node, options); + details.AddRange(DeserializeBase(item, node, options)); + details.AddNotNull(DeserializeTemplate(item, node)); + details.AddRange(DeserializeSchedules(item, node, options)); - return SyncAttempt.Succeed(item.Name, item, ChangeType.Import); + return SyncAttempt.Succeed(item.Name, item, ChangeType.Import, details); } - protected virtual void DeserializeTemplate(IContent item, XElement node) + protected virtual uSyncChange DeserializeTemplate(IContent item, XElement node) { var templateNode = node.Element("Info")?.Element("Template"); @@ -156,10 +156,11 @@ protected virtual void DeserializeTemplate(IContent item, XElement node) if (!string.IsNullOrWhiteSpace(alias)) { var template = fileService.GetTemplate(alias); - if (template != null) + if (template != null && template.Id != item.TemplateId) { + var oldValue = item.TemplateId; item.TemplateId = template.Id; - return; + return uSyncChange.Update("Template", "Template", oldValue, template.Id); } } @@ -167,21 +168,25 @@ protected virtual void DeserializeTemplate(IContent item, XElement node) if (key != Guid.Empty) { var template = fileService.GetTemplate(key); - if (template != null) + if (template != null && template.Id != item.TemplateId) { + var oldValue = item.TemplateId; item.TemplateId = template.Id; - return; + return uSyncChange.Update("Template", "Template", oldValue, template.Id); } } - } + + return null; } - private void DeserializeSchedules(IContent item, XElement node, SyncSerializerOptions options) + private IEnumerable DeserializeSchedules(IContent item, XElement node, SyncSerializerOptions options) { var schedules = node.Element("Info")?.Element("Schedule"); if (schedules != null && schedules.HasElements) { + var changes = new List(); + var currentSchedules = item.ContentSchedule.FullSchedule; var nodeSchedules = new List(); @@ -211,7 +216,12 @@ private void DeserializeSchedules(IContent item, XElement node, SyncSerializerOp { item.ContentSchedule.Remove(oldItem); } + + return changes; + } + + return Enumerable.Empty(); } private ContentSchedule GetContentScheduleFromNode(XElement scheduleNode) @@ -240,41 +250,46 @@ public override SyncAttempt DeserializeSecondPass(IContent item, XElem return SyncAttempt.Fail(item.Name, ChangeType.ImportFail, attempt.Exception); } + var changes = attempt.Result; + // sort order var sortOrder = node.Element("Info").Element("SortOrder").ValueOrDefault(-1); - HandleSortOrder(item, sortOrder); - + changes.AddNotNull(HandleSortOrder(item, sortOrder)); var trashed = node.Element("Info").Element("Trashed").ValueOrDefault(false); - HandleTrashedState(item, trashed); + changes.AddNotNull(HandleTrashedState(item, trashed)); // published status // this does the last save and publish var saveAttempt = DoSaveOrPublish(item, node, options); - if (saveAttempt.Success) { // we say no change back, this stops the core second pass function from saving // this item (which we have just done with DoSaveOrPublish) - return SyncAttempt.Succeed(item.Name, item, ChangeType.NoChange, attempt.Status, true); + return SyncAttempt.Succeed(item.Name, item, ChangeType.NoChange, attempt.Status, true, changes); } return SyncAttempt.Fail(item.Name, item, ChangeType.ImportFail, $"{saveAttempt.Result} {attempt.Status}"); } - protected override void HandleTrashedState(IContent item, bool trashed) + protected override uSyncChange HandleTrashedState(IContent item, bool trashed) { if (!trashed && item.Trashed) { // if the item is trashed, then the change of it's parent // should restore it (as long as we do a move!) contentService.Move(item, item.ParentId); + return uSyncChange.Update("Restored", item.Name, "Recycle Bin", item.ParentId.ToString()); + } else if (trashed && !item.Trashed) { // move to the recycle bin contentService.MoveToRecycleBin(item); + return uSyncChange.Update("Moved to Bin", item.Name, "", "Recycle Bin"); } + + return null; } protected virtual Attempt DoSaveOrPublish(IContent item, XElement node, SyncSerializerOptions options) @@ -362,6 +377,11 @@ public Attempt PublishItem(IContent item) try { var result = contentService.SaveAndPublish(item); + if (!result.Success) + { + var messages = result.EventMessages.FormatMessages(","); + logger.Error("Failed to publish {result} : {messages}", result.Result, messages); + } return result.ToAttempt(); } catch (ArgumentNullException ex) @@ -398,12 +418,7 @@ private Attempt PublishItem(IContent item, IDictionary $"{x.Category} {x.MessageType} {x.Message}")); - logger.Error("Failed to Publish {result} {messages}", result.Result, messages); - return result.ToAttempt(); - } + if (!result.Success) return result.ToAttempt(); // if its published here it's also saved, so we can skip the save below. hasBeenSaved = true; @@ -468,10 +483,14 @@ private void UnpublishMissingCultures(IContent item, string[] allCultures) #endregion - protected override IContent CreateItem(string alias, ITreeEntity parent, string itemType) + protected override Attempt CreateItem(string alias, ITreeEntity parent, string itemType) { var parentId = parent != null ? parent.Id : -1; - return contentService.Create(alias, parentId, itemType); + var item = contentService.Create(alias, parentId, itemType); + if (item == null) + return Attempt.Fail(item, new ArgumentException($"Unable to create content item of type {itemType}")); + + return Attempt.Succeed(item); } #region Finders @@ -488,28 +507,14 @@ protected override IContent FindItem(int id) } protected override IContent FindItem(Guid key) - { - if (performDoubleLookup) - { - // fixed v8.4+ by https://github.com/umbraco/Umbraco-CMS/issues/2997 - var entity = entityService.Get(key); - if (entity != null) - return contentService.GetById(entity.Id); - } - else - { - return contentService.GetById(key); - } - - return null; - } + => contentService.GetById(key); protected override IContent FindAtRoot(string alias) { var rootNodes = contentService.GetRootContent(); if (rootNodes.Any()) { - return rootNodes.FirstOrDefault(x => x.Name.ToSafeAlias().InvariantEquals(alias)); + return rootNodes.FirstOrDefault(x => x.Name.ToSafeAlias(shortStringHelper).InvariantEquals(alias)); } return null; diff --git a/uSync8.ContentEdition/Serializers/ContentSerializerBase.cs b/uSync.ContentEdition/Serializers/ContentSerializerBase.cs similarity index 82% rename from uSync8.ContentEdition/Serializers/ContentSerializerBase.cs rename to uSync.ContentEdition/Serializers/ContentSerializerBase.cs index b7fc8716..061efa96 100644 --- a/uSync8.ContentEdition/Serializers/ContentSerializerBase.cs +++ b/uSync.ContentEdition/Serializers/ContentSerializerBase.cs @@ -1,10 +1,6 @@ using System; -using System.Collections.Concurrent; using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; using System.Linq; -using System.Runtime.InteropServices.WindowsRuntime; -using System.Text; using System.Xml.Linq; using Umbraco.Core; @@ -12,16 +8,17 @@ using Umbraco.Core.Models; using Umbraco.Core.Models.Entities; using Umbraco.Core.Services; +using Umbraco.Core.Strings; -using uSync8.ContentEdition.Mapping; -using uSync8.Core; -using uSync8.Core.Extensions; -using uSync8.Core.Models; -using uSync8.Core.Serialization; +using uSync.ContentEdition.Mapping; +using uSync.Core; +using uSync.Core.Extensions; +using uSync.Core.Models; +using uSync.Core.Serialization; using static Umbraco.Core.Models.Property; -namespace uSync8.ContentEdition.Serializers +namespace uSync.ContentEdition.Serializers { public abstract class ContentSerializerBase : SyncTreeSerializerBase, ISyncContentSerializer where TObject : IContentBase @@ -32,6 +29,8 @@ public abstract class ContentSerializerBase : SyncTreeSerializerBase pathCache; @@ -42,6 +41,7 @@ public abstract class ContentSerializerBase : SyncTreeSerializerBase !dontSerialize.InvariantContains(x.Alias)) + .Cast() .OrderBy(x => x.Alias)) { var propertyNode = new XElement(property.Alias); @@ -205,7 +208,7 @@ protected virtual XElement SerializeProperties(TObject item, SyncSerializerOptio // this can cause us false change readings // but we need to preserve the values if they are blank // because we have to be able to set them to blank on deserialization - foreach (var value in property.Values) + foreach (var value in property.Values.Cast()) { var valueNode = new XElement("Value"); @@ -274,15 +277,16 @@ protected override SyncAttempt CanDeserialize(XElement node, SyncSerial return SyncAttempt.Succeed("No check", ChangeType.NoChange); } - protected virtual Attempt DeserializeBase(TObject item, XElement node, SyncSerializerOptions options) + protected virtual IEnumerable DeserializeBase(TObject item, XElement node, SyncSerializerOptions options) { - if (node == null || node.Element("Info") == null) return Attempt.Fail("Missing Node info XML Invalid"); - var info = node.Element("Info"); + var info = node?.Element("Info"); + if (info == null) return Enumerable.Empty(); + var changes = new List(); var parentId = -1; var nodeLevel = CalculateNodeLevel(item, default(TObject)); - var nodePath = CalculateNodePath(item, default(TObject)); + var nodePath = CalculateNodePath(item, default(TObject)); var parentNode = info.Element("Parent"); if (parentNode != null) @@ -312,6 +316,7 @@ protected virtual Attempt DeserializeBase(TObject item, XElement node, S if (item.ParentId != parentId) { + changes.AddUpdate("Parent", item.ParentId, parentId); logger.Verbose(serializerType, "{Id} Setting Parent {ParentId}", item.Id, parentId); item.ParentId = parentId; } @@ -320,12 +325,14 @@ protected virtual Attempt DeserializeBase(TObject item, XElement node, S // because they might change without this node being saved). if (item.Path != nodePath) { + changes.AddUpdate("Path", item.Path, nodePath); logger.Debug(serializerType, "{Id} Setting Path {idPath} was {oldPath}", item.Id, nodePath, item.Path); - item.Path = nodePath; + item.Path = nodePath; } if (item.Level != nodeLevel) { + changes.AddUpdate("Level", item.Level, nodeLevel); logger.Debug(serializerType, "{Id} Setting Level to {Level} was {OldLevel}", item.Id, nodeLevel, item.Level); item.Level = nodeLevel; } @@ -334,6 +341,7 @@ protected virtual Attempt DeserializeBase(TObject item, XElement node, S var key = node.GetKey(); if (key != Guid.Empty && item.Key != key) { + changes.AddUpdate("Key", item.Key, key); logger.Verbose(serializerType, "{Id} Setting Key {Key}", item.Id, key); item.Key = key; } @@ -341,24 +349,35 @@ protected virtual Attempt DeserializeBase(TObject item, XElement node, S var createDate = info.Element("CreateDate").ValueOrDefault(item.CreateDate); if (item.CreateDate != createDate) { + changes.AddUpdate("CreateDate", item.CreateDate, createDate); logger.Verbose(serializerType, "{id} Setting CreateDate", item.Id, createDate); item.CreateDate = createDate; } - DeserializeName(item, node, options); + changes.AddRange(DeserializeName(item, node, options)); - return Attempt.Succeed("Info Deserialized"); + return changes; } - protected Attempt DeserializeName(TObject item, XElement node, SyncSerializerOptions options) + protected IEnumerable DeserializeName(TObject item, XElement node, SyncSerializerOptions options) { var nameNode = node.Element("Info")?.Element("NodeName"); if (nameNode == null) - return Attempt.Fail(item, new Exception("Missing Nodename")); + return Enumerable.Empty(); + + var updated = false; + + + var changes = new List(); var name = nameNode.Attribute("Default").ValueOrDefault(string.Empty); - if (name != string.Empty) + if (name != string.Empty && item.Name != name) + { + changes.AddUpdate("Name", item.Name, name); + updated = true; + item.Name = name; + } if (nameNode.HasElements) { @@ -373,28 +392,33 @@ protected Attempt DeserializeName(TObject item, XElement node, SyncSeri { var cultureName = cultureNode.ValueOrDefault(string.Empty); - if (cultureName != string.Empty) + var currentCultureName = item.GetCultureName(culture); + if (cultureName != string.Empty && cultureName != currentCultureName) { + changes.AddUpdate($"Name ({culture})", currentCultureName, cultureName); + updated = true; + item.SetCultureName(cultureName, culture); } } } } - CleanCaches(item.Id); + if (updated) CleanCaches(item.Id); - return Attempt.Succeed(item); + return changes; } - protected Attempt DeserializeProperties(TObject item, XElement node, SyncSerializerOptions options) + protected Attempt, string> DeserializeProperties(TObject item, XElement node, SyncSerializerOptions options) { string errors = ""; + List changes = new List(); var activeCultures = options.GetDeserializedCultures(node); var properties = node.Element("Properties"); if (properties == null || !properties.HasElements) - return Attempt.SucceedWithStatus(errors, item); // new Exception("No Properties in the content node")); + return Attempt.SucceedWithStatus(errors, changes); // new Exception("No Properties in the content node")); foreach (var property in properties.Elements()) { @@ -406,14 +430,14 @@ protected Attempt DeserializeProperties(TObject item, XElement logger.Verbose(serializerType, "Derserialize Property {0} {1}", alias, current.PropertyType.PropertyEditorAlias); var values = property.Elements("Value").ToList(); - + foreach (var value in values) { var culture = value.Attribute("Culture").ValueOrDefault(string.Empty); var segment = value.Attribute("Segment").ValueOrDefault(string.Empty); var propValue = value.ValueOrDefault(string.Empty); - logger.Verbose(serializerType, "{Property} Culture {Culture} Segment {Segment}", alias, culture, segment); + logger.Verbose(serializerType, "{item} {Property} Culture {Culture} Segment {Segment}", item.Name, alias, culture, segment); try { @@ -433,16 +457,16 @@ protected Attempt DeserializeProperties(TObject item, XElement { // this culture is not the default for the site, so don't use it to // set the single language value. - logger.Warn(serializerType, "Culture {culture} in file, but is not default so not being used", culture); + logger.Warn(serializerType, "{item} Culture {culture} in file, but is not default so not being used", item.Name, culture); continue; } - logger.Warn(serializerType, "Cannot set value on culture {culture} because it is not avalible for this property - value in default language will be used", culture); + logger.Warn(serializerType, "{item} Cannot set value on culture {culture} because it is not avalible for this property - value in default language will be used", item.Name, culture); culture = string.Empty; } else if (!item.AvailableCultures.InvariantContains(culture)) { // this culture isn't one of the ones, that can be set on this language. - logger.Warn(serializerType, "Culture {culture} is not one of the avalible cultures, so we cannot set this value", culture); + logger.Warn(serializerType, "{item} Culture {culture} is not one of the avalible cultures, so we cannot set this value", item.Name, culture); continue; } } @@ -460,26 +484,33 @@ protected Attempt DeserializeProperties(TObject item, XElement } else { - logger.Warn(serializerType, "Property {Alias} contains a value that has no culture but this property varies by culture so this value has no effect", alias); - continue; // try with the next one. + logger.Warn(serializerType, "{item} Property {Alias} contains a value that has no culture but this property varies by culture so this value has no effect", item.Name, alias); + continue; } } } // get here ... set the value var itemValue = GetImportValue(propValue, current.PropertyType, culture, segment); - item.SetValue(alias, itemValue, - string.IsNullOrEmpty(culture) ? null : culture, - string.IsNullOrEmpty(segment) ? null : segment); + var currentValue = item.GetValue(alias, culture, segment); + + if (IsUpdatedValue(currentValue, itemValue)) + { + changes.AddUpdateJson(alias, currentValue, itemValue, $"Property/{alias}"); + + item.SetValue(alias, itemValue, + string.IsNullOrEmpty(culture) ? null : culture, + string.IsNullOrEmpty(segment) ? null : segment); - logger.Debug(serializerType, "Property {alias} {culture} : value set", alias, culture ?? ""); - logger.Verbose(serializerType, "{Id} Property [{alias}] {culture} : {itemValue}", item.Id, alias,culture ?? "", itemValue); + logger.Debug(serializerType, "Property {item} set {alias} value", item.Name, alias); + logger.Verbose(serializerType, "{Id} Property [{alias}] : {itemValue}", item.Id, alias, itemValue); + } } catch (Exception ex) { // capture here to be less agressive with failure. // if one property fails the rest will still go in. - logger.Warn(serializerType, "Failed to set [{alias}] {propValue} Ex: {Exception}", alias, propValue, ex.ToString()); + logger.Warn(serializerType, "{item} Failed to set [{alias}] {propValue} Ex: {Exception}", item.Name, alias, propValue, ex.ToString()); errors += $"Failed to set [{alias}] {ex.Message}
"; } } @@ -487,26 +518,59 @@ protected Attempt DeserializeProperties(TObject item, XElement else { logger.Warn(serializerType, "DeserializeProperties: item {Name} doesn't have property {alias} but its in the xml", item.Name, alias); - errors += $"Item {Name} doesn't contain {alias}"; + errors += $"{item.Name} does not container property {alias}"; } } - return Attempt.SucceedWithStatus(errors, item); + return Attempt.SucceedWithStatus(errors, changes); + } + + /// + /// compares to object values to see if they are the same. + /// + /// + /// Object.Equals will check nulls, and object values. but + /// the value from the xml will not be coming back as the + /// same type as that in the object (if its set). + /// + /// So we attempt to convert to the type stored in the current + /// value, and then compare that. which gets us a better check. + /// + private bool IsUpdatedValue(object current, object newValue) + { + if (Object.Equals(current, newValue)) return false; + + // diffrent types? + if (current != null && newValue != null && current.GetType() != newValue.GetType()) + { + var currentType = current.GetType(); + var attempt = newValue.TryConvertTo(currentType); + if (attempt.Success) return !current.Equals(attempt.Result); + } + + return true; } - - protected void HandleSortOrder(TObject item, int sortOrder) + + protected uSyncChange HandleSortOrder(TObject item, int sortOrder) { - if (sortOrder != -1) + if (sortOrder != -1 && item.SortOrder != sortOrder) { logger.Verbose(serializerType, "{id} Setting Sort Order {sortOrder}", item.Id, sortOrder); + + var currentSortOrder = item.SortOrder; + item.SortOrder = sortOrder; + + return uSyncChange.Update("SortOrder", "SortOrder", currentSortOrder, sortOrder); } + + return null; } - protected abstract void HandleTrashedState(TObject item, bool trashed); + protected abstract uSyncChange HandleTrashedState(TObject item, bool trashed); - protected string GetExportValue(object value, PropertyType propertyType, string culture, string segment) + protected string GetExportValue(object value, IPropertyType propertyType, string culture, string segment) { // this is where the mapping magic will happen. // at the moment there are no value mappers, but if we need @@ -518,7 +582,7 @@ protected string GetExportValue(object value, PropertyType propertyType, string return exportValue; } - protected object GetImportValue(string value, PropertyType propertyType, string culture, string segment) + protected object GetImportValue(string value, IPropertyType propertyType, string culture, string segment) { // this is where the mapping magic will happen. // at the moment there are no value mappers, but if we need @@ -542,10 +606,10 @@ public override bool IsValid(XElement node) // these are the functions using the simple 'getItem(alias)' // that we cannot use for content/media trees. - protected override TObject FindOrCreate(XElement node) + protected override Attempt FindOrCreate(XElement node) { TObject item = FindItem(node); - if (item != null) return item; + if (item != null) return Attempt.Succeed(item); var alias = node.GetAlias(); @@ -553,7 +617,7 @@ protected override TObject FindOrCreate(XElement node) if (parentKey != Guid.Empty) { item = FindItem(alias, parentKey); - if (item != null) return item; + if (item != null) return Attempt.Succeed(item); } // create @@ -583,7 +647,7 @@ public virtual string GetItemPath(TObject item) var parent = GetTrashedParent(item); if (parent != null) { - return GetItemPath(parent) + "/" + item.Name.ToSafeAlias(); + return GetItemPath(parent) + "/" + item.Name.ToSafeAlias(shortStringHelper); } } @@ -607,7 +671,7 @@ protected virtual string GetItemPath(IEntitySlim item) path += GetItemPath(parent); } - pathCache[item.Path] = path + "/" + item.Name.ToSafeAlias(); + pathCache[item.Path] = path + "/" + item.Name.ToSafeAlias(shortStringHelper); return pathCache[item.Path]; } @@ -667,7 +731,7 @@ protected virtual TObject FindItem(string alias, TObject parent) if (parent != null) { var children = entityService.GetChildren(parent.Id, this.umbracoObjectType); - var child = children.FirstOrDefault(x => x.Name.ToSafeAlias().InvariantEquals(alias)); + var child = children.FirstOrDefault(x => x.Name.ToSafeAlias(shortStringHelper).InvariantEquals(alias)); if (child != null) return FindItem(child.Id); } diff --git a/uSync8.ContentEdition/Serializers/ContentTemplateSerializer.cs b/uSync.ContentEdition/Serializers/ContentTemplateSerializer.cs similarity index 72% rename from uSync8.ContentEdition/Serializers/ContentTemplateSerializer.cs rename to uSync.ContentEdition/Serializers/ContentTemplateSerializer.cs index abcc87c0..4e597c8d 100644 --- a/uSync8.ContentEdition/Serializers/ContentTemplateSerializer.cs +++ b/uSync.ContentEdition/Serializers/ContentTemplateSerializer.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using System.Linq; using System.Xml.Linq; @@ -7,14 +8,15 @@ using Umbraco.Core.Models; using Umbraco.Core.Models.Entities; using Umbraco.Core.Services; +using Umbraco.Core.Strings; -using uSync8.ContentEdition.Mapping; -using uSync8.Core; -using uSync8.Core.Extensions; -using uSync8.Core.Models; -using uSync8.Core.Serialization; +using uSync.ContentEdition.Mapping; +using uSync.Core; +using uSync.Core.Extensions; +using uSync.Core.Models; +using uSync.Core.Serialization; -namespace uSync8.ContentEdition.Serializers +namespace uSync.ContentEdition.Serializers { [SyncSerializer("C4E0E6F8-2742-4C7A-9244-321D5592987A", "contentTemplateSerializer", uSyncConstants.Serialization.Content)] public class ContentTemplateSerializer : ContentSerializer, ISyncOptionsSerializer @@ -22,6 +24,7 @@ public class ContentTemplateSerializer : ContentSerializer, ISyncOptionsSerializ private readonly IContentTypeService contentTypeService; public ContentTemplateSerializer( + IShortStringHelper shortStringHelper, IEntityService entityService, ILocalizationService localizationService, IRelationService relationService, @@ -30,7 +33,7 @@ public ContentTemplateSerializer( IFileService fileService, IContentTypeService contentTypeService, SyncValueMapperCollection syncMappers) - : base(entityService, localizationService, relationService, logger, contentService, fileService, syncMappers) + : base(shortStringHelper, entityService, localizationService, relationService, logger, contentService, fileService, syncMappers) { this.contentTypeService = contentTypeService; } @@ -44,27 +47,27 @@ protected override XElement SerializeInfo(IContent item, SyncSerializerOptions o protected override SyncAttempt DeserializeCore(XElement node, SyncSerializerOptions options) { - var item = FindOrCreate(node); - if (item.Trashed) - { - // TODO: Where has changed trashed state gone? - } + var attempt = FindOrCreate(node); + if (!attempt.Success) throw attempt.Exception; + + var item = attempt.Result; + + var details = new List(); var name = node.Name.LocalName; if (name != string.Empty) + { + details.AddUpdate("Name", item.Name, name); item.Name = name; - + } + item.Blueprint = true; - DeserializeBase(item, node, options); + details.AddRange(DeserializeBase(item, node, options)); // contentService.SaveBlueprint(item); - return SyncAttempt.Succeed( - item.Name, - item, - ChangeType.Import, - ""); + return SyncAttempt.Succeed(item.Name, item, ChangeType.Import, details); } public override IContent FindItem(XElement node) @@ -109,16 +112,22 @@ protected override IContent FindItem(Guid key) protected override IContent FindItem(int id) => contentService.GetBlueprintById(id); - protected override IContent CreateItem(string alias, ITreeEntity parent, string itemType) + protected override Attempt CreateItem(string alias, ITreeEntity parent, string itemType) { var contentType = contentTypeService.Get(itemType); - if (contentType == null) return null; + if (contentType == null) return + Attempt.Fail(null, new ArgumentException($"Missing content Type {itemType}")); + IContent item; if (parent != null) { - return new Content(alias, (IContent)parent, contentType); + item = new Content(alias, (IContent)parent, contentType); } - return new Content(alias, -1, contentType); + else { + item = new Content(alias, -1, contentType); + } + + return Attempt.Succeed(item); } protected override Attempt DoSaveOrPublish(IContent item, XElement node, SyncSerializerOptions options) diff --git a/uSync8.ContentEdition/Serializers/DictionaryItemSerializer.cs b/uSync.ContentEdition/Serializers/DictionaryItemSerializer.cs similarity index 77% rename from uSync8.ContentEdition/Serializers/DictionaryItemSerializer.cs rename to uSync.ContentEdition/Serializers/DictionaryItemSerializer.cs index 573f4f21..7fc6fc79 100644 --- a/uSync8.ContentEdition/Serializers/DictionaryItemSerializer.cs +++ b/uSync.ContentEdition/Serializers/DictionaryItemSerializer.cs @@ -1,17 +1,19 @@ using System; +using System.Collections.Generic; using System.Linq; using System.Xml.Linq; +using Umbraco.Core; using Umbraco.Core.Logging; using Umbraco.Core.Models; using Umbraco.Core.Services; -using uSync8.Core; -using uSync8.Core.Extensions; -using uSync8.Core.Models; -using uSync8.Core.Serialization; +using uSync.Core; +using uSync.Core.Extensions; +using uSync.Core.Models; +using uSync.Core.Serialization; -namespace uSync8.ContentEdition.Serializers +namespace uSync.ContentEdition.Serializers { [SyncSerializer("4D18F4C3-6EBC-4AAD-8D20-6353BDBBD484", "Dicrionary Serializer", uSyncConstants.Serialization.Dictionary)] public class DictionaryItemSerializer : SyncSerializerBase, ISyncOptionsSerializer @@ -32,6 +34,8 @@ protected override SyncAttempt DeserializeCore(XElement node, S var info = node.Element("Info"); var alias = node.GetAlias(); + var details = new List(); + Guid? parentKey = null; var parentItemKey = info.Element("Parent").ValueOrDefault(string.Empty); if (parentItemKey != string.Empty) @@ -56,31 +60,40 @@ protected override SyncAttempt DeserializeCore(XElement node, S } if (item.ItemKey != alias) + { + details.AddUpdate("ItemKey", item.ItemKey, alias); item.ItemKey = alias; + } if (item.Key != key) + { + details.AddUpdate("Key", item.Key, key); item.Key = key; + } - DeserializeTranslations(item, node); + details.AddRange(DeserializeTranslations(item, node)); - return SyncAttempt.Succeed(item.ItemKey, item, ChangeType.Import); + return SyncAttempt.Succeed(item.ItemKey, item, ChangeType.Import, details); } - private void DeserializeTranslations(IDictionaryItem item, XElement node) + private IEnumerable DeserializeTranslations(IDictionaryItem item, XElement node) { - var translationNode = node.Element("Translations"); - if (translationNode == null) return; + var translationNode = node?.Element("Translations"); + if (translationNode == null) return Enumerable.Empty(); var currentTranslations = item.Translations.ToList(); + var changes = new List(); + foreach (var translation in translationNode.Elements("Translation")) { var language = translation.Attribute("Language").ValueOrDefault(string.Empty); if (language == string.Empty) continue; var itemTranslation = item.Translations.FirstOrDefault(x => x.Language.IsoCode == language); - if (itemTranslation != null) + if (itemTranslation != null && itemTranslation.Value != translation.Value) { + changes.AddUpdate(language, itemTranslation.Value, translation.Value, $"{item.ItemKey}/{language}"); itemTranslation.Value = translation.Value; } else @@ -88,6 +101,7 @@ private void DeserializeTranslations(IDictionaryItem item, XElement node) var lang = localizationService.GetLanguageByIsoCode(language); if (lang != null) { + changes.AddNew(language, translation.Value, $"{item.ItemKey}/{language}"); currentTranslations.Add(new DictionaryTranslation(lang, translation.Value)); } } @@ -95,7 +109,7 @@ private void DeserializeTranslations(IDictionaryItem item, XElement node) item.Translations = currentTranslations; - // localizationService.Save(item); + return changes; } protected override SyncAttempt SerializeCore(IDictionaryItem item, SyncSerializerOptions options) @@ -115,7 +129,9 @@ protected override SyncAttempt SerializeCore(IDictionaryItem item, Syn var translationsNode = new XElement("Translations"); - foreach (var translation in item.Translations) + foreach (var translation in item.Translations + .DistinctBy(x => x.Language.IsoCode) + .OrderBy(x => x.Language.IsoCode)) { translationsNode.Add(new XElement("Translation", translation.Value, new XAttribute("Language", translation.Language.IsoCode))); diff --git a/uSync8.ContentEdition/Serializers/DomainSerializer.cs b/uSync.ContentEdition/Serializers/DomainSerializer.cs similarity index 90% rename from uSync8.ContentEdition/Serializers/DomainSerializer.cs rename to uSync.ContentEdition/Serializers/DomainSerializer.cs index 467c3468..e78b1ac1 100644 --- a/uSync8.ContentEdition/Serializers/DomainSerializer.cs +++ b/uSync.ContentEdition/Serializers/DomainSerializer.cs @@ -5,16 +5,17 @@ using Umbraco.Core; using Umbraco.Core.Logging; +using Umbraco.Core.Migrations.Expressions.Update; using Umbraco.Core.Models; using Umbraco.Core.Models.Entities; using Umbraco.Core.Services; -using uSync8.Core; -using uSync8.Core.Extensions; -using uSync8.Core.Models; -using uSync8.Core.Serialization; +using uSync.Core; +using uSync.Core.Extensions; +using uSync.Core.Models; +using uSync.Core.Serialization; -namespace uSync8.ContentEdition.Serializers +namespace uSync.ContentEdition.Serializers { [SyncSerializer("9A5C253C-71FA-4FC0-9B7C-9D0522AAE880", "Domain Serializer", uSyncConstants.Serialization.Domain)] public class DomainSerializer : SyncSerializerBase, ISyncOptionsSerializer @@ -38,17 +39,20 @@ protected override SyncAttempt DeserializeCore(XElement node, SyncSeria { var item = FindOrCreate(node); - var info = node.Element("Info"); + var info = node?.Element("Info"); if (info == null) return SyncAttempt.Fail(node.GetAlias(), ChangeType.Fail, new ArgumentNullException("Info", "Missing Info Section in XML")); var isoCode = info.Element("Language").ValueOrDefault(string.Empty) ?? string.Empty; + var changes = new List(); + if (!string.IsNullOrWhiteSpace(isoCode)) { var language = localizationService.GetLanguageByIsoCode(isoCode); - if (language != null) + if (language != null && item.LanguageId != language.Id) { + changes.AddUpdate("Id", item.LanguageId, language.Id); item.LanguageId = language.Id; } } @@ -70,15 +74,13 @@ protected override SyncAttempt DeserializeCore(XElement node, SyncSeria } } - if (rootItem != default(IContent)) + if (rootItem != default(IContent) && item.RootContentId != rootItem.Id) { + changes.AddUpdate("RootItem", item.RootContentId, rootItem.Id); item.RootContentId = rootItem.Id; } - - // domainService.Save(item); - - return SyncAttempt.Succeed(item.DomainName, item, ChangeType.Import); + return SyncAttempt.Succeed(item.DomainName, item, ChangeType.Import, changes); } diff --git a/uSync8.ContentEdition/Serializers/ISyncContentSerializer.cs b/uSync.ContentEdition/Serializers/ISyncContentSerializer.cs similarity index 85% rename from uSync8.ContentEdition/Serializers/ISyncContentSerializer.cs rename to uSync.ContentEdition/Serializers/ISyncContentSerializer.cs index e80a2dac..71dd8a87 100644 --- a/uSync8.ContentEdition/Serializers/ISyncContentSerializer.cs +++ b/uSync.ContentEdition/Serializers/ISyncContentSerializer.cs @@ -5,7 +5,7 @@ using System.Threading.Tasks; using Umbraco.Core.Models.Entities; -namespace uSync8.ContentEdition.Serializers +namespace uSync.ContentEdition.Serializers { public interface ISyncContentSerializer { diff --git a/uSync8.ContentEdition/Serializers/MediaSerializer.cs b/uSync.ContentEdition/Serializers/MediaSerializer.cs similarity index 84% rename from uSync8.ContentEdition/Serializers/MediaSerializer.cs rename to uSync.ContentEdition/Serializers/MediaSerializer.cs index 25de6e58..7de22807 100644 --- a/uSync8.ContentEdition/Serializers/MediaSerializer.cs +++ b/uSync.ContentEdition/Serializers/MediaSerializer.cs @@ -15,31 +15,30 @@ using Umbraco.Core.Models.Entities; using Umbraco.Core.PropertyEditors.ValueConverters; using Umbraco.Core.Services; +using Umbraco.Core.Strings; -using uSync8.ContentEdition.Mapping; -using uSync8.Core; -using uSync8.Core.Extensions; -using uSync8.Core.Models; -using uSync8.Core.Serialization; +using uSync.ContentEdition.Mapping; +using uSync.Core; +using uSync.Core.Extensions; +using uSync.Core.Models; +using uSync.Core.Serialization; -namespace uSync8.ContentEdition.Serializers +namespace uSync.ContentEdition.Serializers { [SyncSerializer("B4060604-CF5A-46D6-8F00-257579A658E6", "MediaSerializer", uSyncConstants.Serialization.Media)] public class MediaSerializer : ContentSerializerBase, ISyncOptionsSerializer { private readonly IMediaService mediaService; - private bool performDoubleLookup; - - public MediaSerializer( + IShortStringHelper shortStringHelper, IEntityService entityService, ILocalizationService localizationService, IRelationService relationService, ILogger logger, IMediaService mediaService, SyncValueMapperCollection syncMappers) - : base(entityService, localizationService, relationService, logger, UmbracoObjectTypes.Media, syncMappers) + : base(shortStringHelper, entityService, localizationService, relationService, logger, UmbracoObjectTypes.Media, syncMappers) { this.mediaService = mediaService; this.relationAlias = Constants.Conventions.RelationTypes.RelateParentMediaFolderOnDeleteAlias; @@ -52,18 +51,18 @@ public MediaSerializer( { "umbracoWidth", "umbracoHeight", "umbracoBytes", "umbracoExtension" }; - - performDoubleLookup = UmbracoVersion.LocalVersion.Major != 8 || UmbracoVersion.LocalVersion.Minor < 4; - } protected override SyncAttempt DeserializeCore(XElement node, SyncSerializerOptions options) { - var item = FindOrCreate(node); + var attempt = FindOrCreate(node); + if (!attempt.Success) throw attempt.Exception; - DeserializeBase(item, node, options); + var item = attempt.Result; - return SyncAttempt.Succeed(item.Name, item, ChangeType.Import); + var details = DeserializeBase(item, node, options); + + return SyncAttempt.Succeed(item.Name, item, ChangeType.Import, details.ToList()); } public override SyncAttempt DeserializeSecondPass(IMedia item, XElement node, SyncSerializerOptions options) @@ -85,22 +84,27 @@ public override SyncAttempt DeserializeSecondPass(IMedia item, XElement return SyncAttempt.Fail(item.Name, ChangeType.Fail, ""); // setting the saved flag on the attempt to true, stops base classes from saving the item. - return SyncAttempt.Succeed(item.Name, item, ChangeType.NoChange, propertyAttempt.Status, true); + return SyncAttempt.Succeed(item.Name, item, ChangeType.NoChange, propertyAttempt.Status, true, + propertyAttempt.Result); } - protected override void HandleTrashedState(IMedia item, bool trashed) + protected override uSyncChange HandleTrashedState(IMedia item, bool trashed) { if (!trashed && item.Trashed) { // if the item is trashed, then moving it back to the parent value // restores it. mediaService.Move(item, item.ParentId); + return uSyncChange.Update("Restored", item.Name, "Recycle Bin", item.ParentId.ToString()); } else if (trashed && !item.Trashed) { // move to the recycle bin mediaService.MoveToRecycleBin(item); + return uSyncChange.Update("Moved to Bin", item.Name, "", "Recycle Bin"); } + + return null; } @@ -173,11 +177,11 @@ private string GetFilePath(string value) return value; } - protected override IMedia CreateItem(string alias, ITreeEntity parent, string itemType) + protected override Attempt CreateItem(string alias, ITreeEntity parent, string itemType) { var parentId = parent != null ? parent.Id : -1; var item = mediaService.CreateMedia(alias, parentId, itemType); - return item; + return Attempt.Succeed((IMedia)item); } protected override IMedia FindItem(int id) @@ -194,28 +198,14 @@ protected override IMedia FindItem(int id) protected override IMedia FindItem(Guid key) - { - if (performDoubleLookup) - { - // fixed v8.4+ by https://github.com/umbraco/Umbraco-CMS/issues/2997 - var entity = entityService.Get(key); - if (entity != null) - return mediaService.GetById(entity.Id); - } - else - { - return mediaService.GetById(key); - } - - return null; - } + => mediaService.GetById(key); protected override IMedia FindAtRoot(string alias) { var rootNodes = mediaService.GetRootMedia(); if (rootNodes.Any()) { - return rootNodes.FirstOrDefault(x => x.Name.ToSafeAlias().InvariantEquals(alias)); + return rootNodes.FirstOrDefault(x => x.Name.ToSafeAlias(shortStringHelper).InvariantEquals(alias)); } return null; diff --git a/uSync8.ContentEdition/Serializers/RelationTypeSerializer.cs b/uSync.ContentEdition/Serializers/RelationTypeSerializer.cs similarity index 86% rename from uSync8.ContentEdition/Serializers/RelationTypeSerializer.cs rename to uSync.ContentEdition/Serializers/RelationTypeSerializer.cs index e1ed2ac0..15094554 100644 --- a/uSync8.ContentEdition/Serializers/RelationTypeSerializer.cs +++ b/uSync.ContentEdition/Serializers/RelationTypeSerializer.cs @@ -7,12 +7,12 @@ using Umbraco.Core.Models; using Umbraco.Core.Services; -using uSync8.Core; -using uSync8.Core.Extensions; -using uSync8.Core.Models; -using uSync8.Core.Serialization; +using uSync.Core; +using uSync.Core.Extensions; +using uSync.Core.Models; +using uSync.Core.Serialization; -namespace uSync8.ContentEdition.Serializers +namespace uSync.ContentEdition.Serializers { /// /// Serializer for RelationTypes and optionally the relations inside them. @@ -47,28 +47,46 @@ protected override SyncAttempt DeserializeCore(XElement node, Syn if (item == null) { - item = new RelationType(childType, parentType, alias); + item = new RelationType(name, alias, bidirectional, childType, parentType); } - var changes = new List(); + var details = new List(); if (item.Key != key) + { + details.AddUpdate("Key", item.Key, key); item.Key = key; + } if (item.Name != name) + { + details.AddUpdate("Name", item.Name, name); item.Name = name; + } if (item.Alias != alias) + { + details.AddUpdate("Alias", item.Alias, alias); item.Alias = alias; + } if (item.ParentObjectType != parentType) + { + details.AddUpdate("ParentType", item.ParentObjectType, parentType); item.ParentObjectType = parentType; + } if (item.ChildObjectType != childType) + { + details.AddUpdate("ChildType", item.ChildObjectType, childType); item.ChildObjectType = childType; + } if (item.IsBidirectional = bidirectional) + { + details.AddUpdate("Bidirectional", item.IsBidirectional, bidirectional); item.IsBidirectional = bidirectional; + } var hasBeenSaved = false; if (options.GetSetting("IncludeRelations", true)) @@ -76,12 +94,10 @@ protected override SyncAttempt DeserializeCore(XElement node, Syn // we have to save before we can add the relations. this.SaveItem(item); hasBeenSaved = true; - changes.AddRange(DeserializeRelations(node, item)); + details.AddRange(DeserializeRelations(node, item)); } - var attempt = SyncAttempt.Succeed(item.Name, item, ChangeType.Import, hasBeenSaved); - attempt.Details = changes; - return attempt; + return SyncAttempt.Succeed(item.Name, item, ChangeType.Import, hasBeenSaved, details); } /// diff --git a/uSync8.ContentEdition/Tracker/ContentBaseTracker.cs b/uSync.ContentEdition/Tracker/ContentBaseTracker.cs similarity index 96% rename from uSync8.ContentEdition/Tracker/ContentBaseTracker.cs rename to uSync.ContentEdition/Tracker/ContentBaseTracker.cs index f13440f2..0da8b837 100644 --- a/uSync8.ContentEdition/Tracker/ContentBaseTracker.cs +++ b/uSync.ContentEdition/Tracker/ContentBaseTracker.cs @@ -3,10 +3,10 @@ using Umbraco.Core.Models; -using uSync8.Core.Serialization; -using uSync8.Core.Tracking; +using uSync.Core.Serialization; +using uSync.Core.Tracking; -namespace uSync8.ContentEdition.Tracker +namespace uSync.ContentEdition.Tracker { public abstract class ContentBaseTracker : SyncBaseTracker where TObject : IContentBase diff --git a/uSync8.ContentEdition/Tracker/ContentTracker.cs b/uSync.ContentEdition/Tracker/ContentTracker.cs similarity index 97% rename from uSync8.ContentEdition/Tracker/ContentTracker.cs rename to uSync.ContentEdition/Tracker/ContentTracker.cs index 38afb60f..b6cdb823 100644 --- a/uSync8.ContentEdition/Tracker/ContentTracker.cs +++ b/uSync.ContentEdition/Tracker/ContentTracker.cs @@ -2,10 +2,10 @@ using Umbraco.Core.Models; -using uSync8.Core.Serialization; -using uSync8.Core.Tracking; +using uSync.Core.Serialization; +using uSync.Core.Tracking; -namespace uSync8.ContentEdition.Tracker +namespace uSync.ContentEdition.Tracker { public class ContentTracker : SyncBaseTracker, ISyncTracker { diff --git a/uSync8.ContentEdition/Tracker/DictionaryItemTracker.cs b/uSync.ContentEdition/Tracker/DictionaryItemTracker.cs similarity index 93% rename from uSync8.ContentEdition/Tracker/DictionaryItemTracker.cs rename to uSync.ContentEdition/Tracker/DictionaryItemTracker.cs index 9690fbcb..c17a20a4 100644 --- a/uSync8.ContentEdition/Tracker/DictionaryItemTracker.cs +++ b/uSync.ContentEdition/Tracker/DictionaryItemTracker.cs @@ -2,10 +2,10 @@ using Umbraco.Core.Models; -using uSync8.Core.Serialization; -using uSync8.Core.Tracking; +using uSync.Core.Serialization; +using uSync.Core.Tracking; -namespace uSync8.ContentEdition.Tracker +namespace uSync.ContentEdition.Tracker { public class DictionaryItemTracker : SyncBaseTracker, ISyncTracker { diff --git a/uSync8.ContentEdition/Tracker/DomainTracker.cs b/uSync.ContentEdition/Tracker/DomainTracker.cs similarity index 87% rename from uSync8.ContentEdition/Tracker/DomainTracker.cs rename to uSync.ContentEdition/Tracker/DomainTracker.cs index 0c7279db..8dd96bd5 100644 --- a/uSync8.ContentEdition/Tracker/DomainTracker.cs +++ b/uSync.ContentEdition/Tracker/DomainTracker.cs @@ -2,10 +2,10 @@ using Umbraco.Core.Models; -using uSync8.Core.Serialization; -using uSync8.Core.Tracking; +using uSync.Core.Serialization; +using uSync.Core.Tracking; -namespace uSync8.ContentEdition.Tracker +namespace uSync.ContentEdition.Tracker { public class DomainTracker : SyncBaseTracker, ISyncTracker { diff --git a/uSync8.ContentEdition/Tracker/MediaTracker.cs b/uSync.ContentEdition/Tracker/MediaTracker.cs similarity index 70% rename from uSync8.ContentEdition/Tracker/MediaTracker.cs rename to uSync.ContentEdition/Tracker/MediaTracker.cs index e4492a11..3e437ce2 100644 --- a/uSync8.ContentEdition/Tracker/MediaTracker.cs +++ b/uSync.ContentEdition/Tracker/MediaTracker.cs @@ -1,9 +1,9 @@ using Umbraco.Core.Models; -using uSync8.Core.Serialization; -using uSync8.Core.Tracking; +using uSync.Core.Serialization; +using uSync.Core.Tracking; -namespace uSync8.ContentEdition.Tracker +namespace uSync.ContentEdition.Tracker { public class MediaTracker : ContentBaseTracker, ISyncTracker { diff --git a/uSync8.ContentEdition/Tracker/RelationTypeTracker.cs b/uSync.ContentEdition/Tracker/RelationTypeTracker.cs similarity index 91% rename from uSync8.ContentEdition/Tracker/RelationTypeTracker.cs rename to uSync.ContentEdition/Tracker/RelationTypeTracker.cs index da34f30c..d02f8683 100644 --- a/uSync8.ContentEdition/Tracker/RelationTypeTracker.cs +++ b/uSync.ContentEdition/Tracker/RelationTypeTracker.cs @@ -2,10 +2,10 @@ using Umbraco.Core.Models; -using uSync8.Core.Serialization; -using uSync8.Core.Tracking; +using uSync.Core.Serialization; +using uSync.Core.Tracking; -namespace uSync8.ContentEdition.Tracker +namespace uSync.ContentEdition.Tracker { public class RelationTypeTracker : SyncBaseTracker, ISyncTracker diff --git a/uSync.ContentEdition/uSync.ContentEdition.csproj b/uSync.ContentEdition/uSync.ContentEdition.csproj new file mode 100644 index 00000000..84f70abc --- /dev/null +++ b/uSync.ContentEdition/uSync.ContentEdition.csproj @@ -0,0 +1,12 @@ + + + + netcoreapp3.1 + + + + + + + + diff --git a/uSync8.ContentEdition/uSync8ContentEdition.cs b/uSync.ContentEdition/uSyncContentEdition.cs similarity index 57% rename from uSync8.ContentEdition/uSync8ContentEdition.cs rename to uSync.ContentEdition/uSyncContentEdition.cs index 54a4f157..d565e88e 100644 --- a/uSync8.ContentEdition/uSync8ContentEdition.cs +++ b/uSync.ContentEdition/uSyncContentEdition.cs @@ -1,23 +1,19 @@  +using Newtonsoft.Json; +using Newtonsoft.Json.Serialization; + using Umbraco.Core; -using Umbraco.Core.Models; using Umbraco.Core.Composing; +using Umbraco.Core.Models; -using uSync8.ContentEdition.Serializers; -using uSync8.Core.Serialization; -using uSync8.Core.Tracking; -using uSync8.ContentEdition.Tracker; -using uSync8.Core; -using uSync8.BackOffice; -using uSync8.BackOffice.Models; -using uSync8.ContentEdition.Mapping; -using Newtonsoft.Json; -using Newtonsoft.Json.Serialization; -using uSync8.Core.Dependency; -using uSync8.ContentEdition.Checkers; -using uSync.ContentEdition.Checkers; +using uSync.BackOffice; +using uSync.BackOffice.Models; +using uSync.ContentEdition.Mapping; +using uSync.ContentEdition.Serializers; +using uSync.Core; +using uSync.Core.Serialization; -namespace uSync8.ContentEdition +namespace uSync.ContentEdition { [JsonObject(NamingStrategyType = typeof(DefaultNamingStrategy))] public class uSyncContent : ISyncAddOn @@ -42,8 +38,14 @@ public class uSyncContent : ISyncAddOn [ComposeBefore(typeof(uSyncBackOfficeComposer))] public class uSyncContentComposer : IUserComposer { + public uSyncContentComposer() + { + } + public void Compose(Composition composition) { + composition.RegisterUnique(); + composition.Register, ContentSerializer>(); composition.Register(); composition.Register, MediaSerializer>(); @@ -51,18 +53,6 @@ public void Compose(Composition composition) composition.Register, DomainSerializer>(); composition.Register, RelationTypeSerializer>(); - composition.Register, ContentTracker>(); - composition.Register, MediaTracker>(); - composition.Register, DictionaryItemTracker>(); - composition.Register, DomainTracker>(); - composition.Register, RelationTypeTracker>(); - - composition.Register, ContentChecker>(); - composition.Register, MediaChecker>(); - composition.Register, DictionaryItemChecker>(); - composition.Register, DomainChecker>(); - composition.Register, RelationTypeChecker>(); - composition.WithCollectionBuilder() .Add(composition.TypeLoader.GetTypes()); } diff --git a/uSync8.ContentEdition/uSyncContentState.cs b/uSync.ContentEdition/uSyncContentState.cs similarity index 55% rename from uSync8.ContentEdition/uSyncContentState.cs rename to uSync.ContentEdition/uSyncContentState.cs index ef251b6e..670070bc 100644 --- a/uSync8.ContentEdition/uSyncContentState.cs +++ b/uSync.ContentEdition/uSyncContentState.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace uSync8.ContentEdition +namespace uSync.ContentEdition { /// /// the state we thing a culture / content item should be in. diff --git a/uSync8.Core/ChangeType.cs b/uSync.Core/ChangeType.cs similarity index 77% rename from uSync8.Core/ChangeType.cs rename to uSync.Core/ChangeType.cs index 30538e92..4b1cc87d 100644 --- a/uSync8.Core/ChangeType.cs +++ b/uSync.Core/ChangeType.cs @@ -1,6 +1,8 @@ -namespace uSync8.Core +namespace uSync.Core { - + /// + /// Type of change performed + /// public enum ChangeType : int { Clean = -2, diff --git a/uSync8.Core/DataTypes/ConfigurationSerializerBase.cs b/uSync.Core/DataTypes/ConfigurationSerializerBase.cs similarity index 94% rename from uSync8.Core/DataTypes/ConfigurationSerializerBase.cs rename to uSync.Core/DataTypes/ConfigurationSerializerBase.cs index eec8b695..6b8f8f95 100644 --- a/uSync8.Core/DataTypes/ConfigurationSerializerBase.cs +++ b/uSync.Core/DataTypes/ConfigurationSerializerBase.cs @@ -5,7 +5,7 @@ using System.Text; using System.Threading.Tasks; -namespace uSync8.Core.DataTypes +namespace uSync.Core.DataTypes { public abstract class ConfigurationSerializerBase { diff --git a/uSync8.Core/DataTypes/ConfigurationSerializerCollectionBuilder.cs b/uSync.Core/DataTypes/ConfigurationSerializerCollectionBuilder.cs similarity index 96% rename from uSync8.Core/DataTypes/ConfigurationSerializerCollectionBuilder.cs rename to uSync.Core/DataTypes/ConfigurationSerializerCollectionBuilder.cs index 63202360..18fdd1fe 100644 --- a/uSync8.Core/DataTypes/ConfigurationSerializerCollectionBuilder.cs +++ b/uSync.Core/DataTypes/ConfigurationSerializerCollectionBuilder.cs @@ -6,7 +6,7 @@ using Umbraco.Core; using Umbraco.Core.Composing; -namespace uSync8.Core.DataTypes +namespace uSync.Core.DataTypes { public class ConfigurationSerializerCollectionBuilder : LazyCollectionBuilderBase diff --git a/uSync8.Core/DataTypes/IConfigurationSerializer.cs b/uSync.Core/DataTypes/IConfigurationSerializer.cs similarity index 85% rename from uSync8.Core/DataTypes/IConfigurationSerializer.cs rename to uSync.Core/DataTypes/IConfigurationSerializer.cs index a780aeed..d04ff3ec 100644 --- a/uSync8.Core/DataTypes/IConfigurationSerializer.cs +++ b/uSync.Core/DataTypes/IConfigurationSerializer.cs @@ -4,7 +4,9 @@ using System.Text; using System.Threading.Tasks; -namespace uSync8.Core.DataTypes +using uSync.Core.Dependency; + +namespace uSync.Core.DataTypes { public interface IConfigurationSerializer { diff --git a/uSync8.Core/Dependency/DependencyFlags.cs b/uSync.Core/Dependency/DependencyFlags.cs similarity index 74% rename from uSync8.Core/Dependency/DependencyFlags.cs rename to uSync.Core/Dependency/DependencyFlags.cs index f076436a..9fdf991a 100644 --- a/uSync8.Core/Dependency/DependencyFlags.cs +++ b/uSync.Core/Dependency/DependencyFlags.cs @@ -1,6 +1,6 @@ using System; -namespace uSync8.Core.Dependency +namespace uSync.Core.Dependency { [Flags] public enum DependencyFlags @@ -12,6 +12,7 @@ public enum DependencyFlags IncludeViews = 16, IncludeMedia = 32, IncludeLinked = 64, - IncludeMediaFiles = 128 + IncludeMediaFiles = 128, + IncludeConfig = 256 } } diff --git a/uSync8.Core/Dependency/DependencyOrders.cs b/uSync.Core/Dependency/DependencyOrders.cs similarity index 98% rename from uSync8.Core/Dependency/DependencyOrders.cs rename to uSync.Core/Dependency/DependencyOrders.cs index 048eb0e1..d862310a 100644 --- a/uSync8.Core/Dependency/DependencyOrders.cs +++ b/uSync.Core/Dependency/DependencyOrders.cs @@ -5,7 +5,7 @@ using System.Threading.Tasks; using static Umbraco.Core.Constants; -namespace uSync8.Core.Dependency +namespace uSync.Core.Dependency { /// /// The base order things go in the dependency tree, diff --git a/uSync8.Core/Dependency/ISyncDependencyChecker.cs b/uSync.Core/Dependency/ISyncDependencyChecker.cs similarity index 93% rename from uSync8.Core/Dependency/ISyncDependencyChecker.cs rename to uSync.Core/Dependency/ISyncDependencyChecker.cs index f8dae0e4..4c0a3e03 100644 --- a/uSync8.Core/Dependency/ISyncDependencyChecker.cs +++ b/uSync.Core/Dependency/ISyncDependencyChecker.cs @@ -5,7 +5,7 @@ using Umbraco.Core.Models; using Umbraco.Core.Models.Entities; -namespace uSync8.Core.Dependency +namespace uSync.Core.Dependency { public interface ISyncDependencyItem { diff --git a/uSync8.Core/Dependency/SyncDependencyCollection.cs b/uSync.Core/Dependency/SyncDependencyCollection.cs similarity index 96% rename from uSync8.Core/Dependency/SyncDependencyCollection.cs rename to uSync.Core/Dependency/SyncDependencyCollection.cs index df5fc85f..0bc348cb 100644 --- a/uSync8.Core/Dependency/SyncDependencyCollection.cs +++ b/uSync.Core/Dependency/SyncDependencyCollection.cs @@ -7,7 +7,7 @@ using Umbraco.Core; using Umbraco.Core.Composing; -namespace uSync8.Core.Dependency +namespace uSync.Core.Dependency { public class SyncDependencyCollection : BuilderCollectionBase diff --git a/uSync8.Core/Dependency/uSyncDependency.cs b/uSync.Core/Dependency/uSyncDependency.cs similarity index 97% rename from uSync8.Core/Dependency/uSyncDependency.cs rename to uSync.Core/Dependency/uSyncDependency.cs index 80d0c54e..402902be 100644 --- a/uSync8.Core/Dependency/uSyncDependency.cs +++ b/uSync.Core/Dependency/uSyncDependency.cs @@ -3,7 +3,7 @@ using Umbraco.Core; -namespace uSync8.Core.Dependency +namespace uSync.Core.Dependency { public delegate void uSyncDependencyUpdate(DependencyMessageArgs e); diff --git a/uSync.Core/Extensions/ChangeListExtensions.cs b/uSync.Core/Extensions/ChangeListExtensions.cs new file mode 100644 index 00000000..353c7a17 --- /dev/null +++ b/uSync.Core/Extensions/ChangeListExtensions.cs @@ -0,0 +1,32 @@ +using System.Collections.Generic; + +using Newtonsoft.Json; + +using uSync.Core.Models; + +namespace uSync.Core +{ + public static class ChangeListExtensions + { + public static void AddNew(this List changes, string name, string value, string path) + { + changes.Add(uSyncChange.Create(path, name, value)); + } + + + public static void AddUpdate(this List changes, string name, TObject oldValue, TObject newValue, string path = "") + => AddUpdate(changes, name, oldValue.ToString(), newValue.ToString(), path); + + public static void AddUpdate(this List changes, string name, string oldValue, string newValue, string path = "") + { + changes.Add(uSyncChange.Update(path, name, oldValue, newValue)); + } + + public static void AddUpdateJson(this List changes, string name, object oldValue, object newValue, string path = "") + { + var oldJson = JsonConvert.SerializeObject(oldValue, Formatting.Indented); + var newJson = JsonConvert.SerializeObject(newValue, Formatting.Indented); + AddUpdate(changes, name, oldJson, newJson, path); + } + } +} diff --git a/uSync8.Core/Extensions/ListExtensions.cs b/uSync.Core/Extensions/ListExtensions.cs similarity index 77% rename from uSync8.Core/Extensions/ListExtensions.cs rename to uSync.Core/Extensions/ListExtensions.cs index 87c748a6..00741bd7 100644 --- a/uSync8.Core/Extensions/ListExtensions.cs +++ b/uSync.Core/Extensions/ListExtensions.cs @@ -1,12 +1,8 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System.Collections.Generic; using Umbraco.Core; -namespace uSync8.Core.Extensions +namespace uSync.Core { public static class ListExtensions { @@ -20,7 +16,7 @@ public static void AddNotNull(this List list, TObject item) } /// - /// Is the value valid for this list (if the list is empty, we say the value is valid). + /// Is the value valid for this list (if the list is empty, we treat it like a wildcard). /// public static bool IsValid(this IList list, string value) => list.Count == 0 || list.InvariantContains(value) || list.InvariantContains("*"); diff --git a/uSync8.Core/Extensions/StringExtensions.cs b/uSync.Core/Extensions/StringExtensions.cs similarity index 99% rename from uSync8.Core/Extensions/StringExtensions.cs rename to uSync.Core/Extensions/StringExtensions.cs index de2dc6e3..df7ba1e3 100644 --- a/uSync8.Core/Extensions/StringExtensions.cs +++ b/uSync.Core/Extensions/StringExtensions.cs @@ -4,7 +4,7 @@ using System.Text; using System.Threading.Tasks; -namespace uSync8.Core +namespace uSync.Core { public static class StringExtensions { diff --git a/uSync8.Core/Extensions/XElementExtensions.cs b/uSync.Core/Extensions/XElementExtensions.cs similarity index 82% rename from uSync8.Core/Extensions/XElementExtensions.cs rename to uSync.Core/Extensions/XElementExtensions.cs index eb597ac2..3395ecaa 100644 --- a/uSync8.Core/Extensions/XElementExtensions.cs +++ b/uSync.Core/Extensions/XElementExtensions.cs @@ -1,29 +1,41 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Text; -using System.Threading.Tasks; using System.Xml.Linq; -using System.Xml.XPath; + using Umbraco.Core; -using Umbraco.Core.Models.Entities; -namespace uSync8.Core.Extensions +namespace uSync.Core.Extensions { public static class XElementExtensions { + /// + /// Summary the level (in the tree) for the item represented by the xml + /// public static int GetLevel(this XElement node) => node.Attribute("Level").ValueOrDefault(0); + /// + /// the Key (guid) for the item represented by the xml + /// public static Guid GetKey(this XElement node) => node.Attribute("Key").ValueOrDefault(Guid.Empty); + /// + /// The alias for the item represented by the xml + /// public static string GetAlias(this XElement node) => node.Attribute("Alias").ValueOrDefault(string.Empty); + /// + /// cultures contained within the xml + /// public static string GetCultures(this XElement node) => node.Attribute(uSyncConstants.CultureKey).ValueOrDefault(string.Empty); + /// + /// Segments contained within the xml + /// public static string GetSegments(this XElement node) => node.Attribute(uSyncConstants.SegmentKey).ValueOrDefault(string.Empty); @@ -45,14 +57,9 @@ public static Guid GetParentKey(this XElement node) : Guid.Empty; } - public static string ValueOrDefault(this XElement node, string defaultValue) - { - if (node == null || string.IsNullOrEmpty(node.Value)) - return defaultValue; - - return node.Value; - } - + /// + /// does the xml represent an 'Empty' item (deleted/renamed/etc) + /// public static bool IsEmptyItem(this XElement node) { return node.Name.LocalName == uSyncConstants.Serialization.Empty; @@ -74,6 +81,9 @@ public static XElement MakeEmpty(Guid key, SyncActionType change, string alias) new XAttribute("Change", change)); } + /// + /// return the uSyncActionType of the empty XML file. + /// public static SyncActionType GetEmptyAction(this XElement node) { if (IsEmptyItem(node)) @@ -82,6 +92,20 @@ public static SyncActionType GetEmptyAction(this XElement node) return SyncActionType.None; } + /// + /// Get the value of the XML Node or return a default value + /// + public static string ValueOrDefault(this XElement node, string defaultValue) + { + if (node == null || string.IsNullOrEmpty(node.Value)) + return defaultValue; + + return node.Value; + } + + /// + /// Get the value of the XML Node or return a default value + /// public static TObject ValueOrDefault(this XElement node, TObject defaultValue) { var value = ValueOrDefault(node, string.Empty); @@ -94,6 +118,10 @@ public static TObject ValueOrDefault(this XElement node, TObject defaul return defaultValue; } + + /// + /// Find a node in the XML or create it if it doesn't exist + /// public static XElement FindOrCreate(this XElement node, string name) { if (node == null) return null; @@ -107,6 +135,9 @@ public static XElement FindOrCreate(this XElement node, string name) return element; } + /// + /// Find a node in the xml by its attribute name, create it if it doesn't exist + /// public static XElement FindOrCreate(this XElement node, string name, string attributeName, string value) { var elements = node.Elements(name); @@ -128,6 +159,9 @@ public static XElement FindOrCreate(this XElement node, string name, string attr return element; } + /// + /// set the value for an element in the xml, if it doesn't exist create it and set the value + /// public static void CreateOrSetElement(this XElement node, string name, string value) { if (node == null) return; @@ -141,6 +175,9 @@ public static void CreateOrSetElement(this XElement node, string name, string va element.Value = value; } + /// + /// set the value for an element in the xml, if it doesn't exist create it and set the value + /// public static void CreateOrSetElement(this XElement node, string name, TObject value) { if (node == null) return; diff --git a/uSync8.Core/ISyncItemFactory.cs b/uSync.Core/ISyncItemFactory.cs similarity index 68% rename from uSync8.Core/ISyncItemFactory.cs rename to uSync.Core/ISyncItemFactory.cs index b5de9d71..1d3de13c 100644 --- a/uSync8.Core/ISyncItemFactory.cs +++ b/uSync.Core/ISyncItemFactory.cs @@ -1,13 +1,16 @@ using System.Collections.Generic; using System.Xml.Linq; -using uSync8.Core.Dependency; -using uSync8.Core.Models; -using uSync8.Core.Serialization; -using uSync8.Core.Tracking; +using uSync.Core.Dependency; +using uSync.Core.Models; +using uSync.Core.Serialization; +using uSync.Core.Tracking; -namespace uSync8.Core +namespace uSync.Core { + /// + /// Factory for getting changes or dependencies from an item. + /// public interface ISyncItemFactory { // tracking items diff --git a/uSync8.Core/Models/SyncAttempt.cs b/uSync.Core/Models/SyncAttempt.cs similarity index 76% rename from uSync8.Core/Models/SyncAttempt.cs rename to uSync.Core/Models/SyncAttempt.cs index 5734fd97..50349b4d 100644 --- a/uSync8.Core/Models/SyncAttempt.cs +++ b/uSync.Core/Models/SyncAttempt.cs @@ -4,7 +4,7 @@ using System; using System.Collections.Generic; -namespace uSync8.Core.Models +namespace uSync.Core.Models { [JsonObject(NamingStrategyType = typeof(DefaultNamingStrategy))] public struct SyncAttempt @@ -68,20 +68,48 @@ private SyncAttempt(bool success, string name, TObject item, Type itemType, Chan Saved = saved; } + // default object success (when we don't pass the item back) + public static SyncAttempt Succeed(string name, ChangeType change) - => new SyncAttempt(true, name, default(TObject), typeof(TObject), change, string.Empty, null, false); + => new SyncAttempt(true, name, default(TObject), typeof(TObject), change, string.Empty, null, false); + + public static SyncAttempt Succeed(string name, ChangeType change, string message) + => new SyncAttempt(true, name, default(TObject), typeof(TObject), change, message, null, false); + + // item passed back versions public static SyncAttempt Succeed(string name, TObject item, ChangeType change) => new SyncAttempt(true, name, item, typeof(TObject), change, string.Empty, null, false); + public static SyncAttempt Succeed(string name, TObject item, ChangeType change, IList details) + { + var attempt = new SyncAttempt(true, name, item, typeof(TObject), change, string.Empty, null, false); + attempt.Details = details; + return attempt; + } + public static SyncAttempt Succeed(string name, TObject item, ChangeType change, bool saved) - => new SyncAttempt(true, name, item, typeof(TObject), change, string.Empty, null, saved); + => Succeed(name, item, change, saved, null); + + public static SyncAttempt Succeed(string name, TObject item, ChangeType change, bool saved, IList details) + { + var attempt = new SyncAttempt(true, name, item, typeof(TObject), change, string.Empty, null, saved); + if (details != null) attempt.Details = details; + return attempt; + } public static SyncAttempt Succeed(string name, TObject item, ChangeType change, string message) => new SyncAttempt(true, name, item, typeof(TObject), change, message, null, false); public static SyncAttempt Succeed(string name, TObject item, ChangeType change, string message, bool saved) - => new SyncAttempt(true, name, item, typeof(TObject), change, message, null, saved); + => Succeed(name, item, change, message, saved, null); + + public static SyncAttempt Succeed(string name, TObject item, ChangeType change, string message, bool saved, IList details) + { + var attempt = new SyncAttempt(true, name, item, typeof(TObject), change, message, null, saved); + if (details != null) attempt.Details = details; + return attempt; + } public static SyncAttempt Fail(string name, TObject item, ChangeType change) => new SyncAttempt(false, name, item, typeof(TObject), change, string.Empty, null, false); diff --git a/uSync8.Core/Models/uSyncChange.cs b/uSync.Core/Models/uSyncChange.cs similarity index 60% rename from uSync8.Core/Models/uSyncChange.cs rename to uSync.Core/Models/uSyncChange.cs index a2eff587..5ebb8100 100644 --- a/uSync8.Core/Models/uSyncChange.cs +++ b/uSync.Core/Models/uSyncChange.cs @@ -1,24 +1,46 @@ -using Newtonsoft.Json; +using System.Collections; +using System.Collections.Generic; + +using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Serialization; -namespace uSync8.Core.Models +namespace uSync.Core.Models { + /// + /// tracks the details of a change to an individual item + /// [JsonObject(NamingStrategyType = typeof(DefaultNamingStrategy))] public class uSyncChange { + /// + /// Name of item/property + /// public string Name { get; set; } + + /// + /// reference path to property + /// public string Path { get; set; } + /// + /// old value (pre change) + /// public string OldValue { get; set; } + + /// + /// new value (after change) + /// public string NewValue { get; set; } + /// + /// Change type + /// [JsonConverter(typeof(StringEnumConverter))] public ChangeDetailType Change { get; set; } public static uSyncChange Create(string path, string name, string newValue, bool useNew = true) - { - return new uSyncChange() + => new uSyncChange { Change = ChangeDetailType.Create, Path = path, @@ -26,11 +48,9 @@ public static uSyncChange Create(string path, string name, string newValue, bool OldValue = "", NewValue = useNew ? newValue : "New Property" }; - } public static uSyncChange Delete(string path, string name, string oldValue, bool useOld = true) - { - return new uSyncChange() + => new uSyncChange { Change = ChangeDetailType.Delete, Path = path, @@ -38,11 +58,9 @@ public static uSyncChange Delete(string path, string name, string oldValue, bool OldValue = useOld ? oldValue : "Missing Property", NewValue = "" }; - } public static uSyncChange Update(string path, string name, string oldValue, string newValue) - { - return new uSyncChange() + => new uSyncChange { Name = name, Path = path, @@ -50,22 +68,29 @@ public static uSyncChange Update(string path, string name, string oldValue, stri NewValue = string.IsNullOrEmpty(newValue) ? "(Blank)" : newValue, OldValue = string.IsNullOrEmpty(oldValue) ? "(Blank)" : oldValue }; - } + + public static uSyncChange Update(string path, string name, IEnumerable oldValues, IEnumerable newValues) + => Update(path, name, string.Join(",", oldValues), string.Join(",", newValues)); public static uSyncChange Update(string path, string name, TObject oldValue, TObject newValue) - { - return Update(path, name, oldValue.ToString(), newValue.ToString()); - } + => Update(path, name, oldValue.ToString(), newValue.ToString()); public static uSyncChange NoChange(string path, string name) - { - return new uSyncChange() + => new uSyncChange { Name = name, Path = path, Change = ChangeDetailType.NoChange }; - } + + public static uSyncChange Error(string path, string name, string oldValue) + => new uSyncChange + { + Name = name, + Path = path, + OldValue = oldValue, + Change = ChangeDetailType.Error + }; } public enum ChangeDetailType diff --git a/uSync8.Core/Serialization/ISyncOptionsSerializer.cs b/uSync.Core/Serialization/ISyncOptionsSerializer.cs similarity index 94% rename from uSync8.Core/Serialization/ISyncOptionsSerializer.cs rename to uSync.Core/Serialization/ISyncOptionsSerializer.cs index b43d63c8..f030269a 100644 --- a/uSync8.Core/Serialization/ISyncOptionsSerializer.cs +++ b/uSync.Core/Serialization/ISyncOptionsSerializer.cs @@ -5,9 +5,9 @@ using System.Threading.Tasks; using System.Xml.Linq; -using uSync8.Core.Models; +using uSync.Core.Models; -namespace uSync8.Core.Serialization +namespace uSync.Core.Serialization { /// /// Serializer that can take options to the main methods. diff --git a/uSync8.Core/Serialization/ISyncSerializer.cs b/uSync.Core/Serialization/ISyncSerializer.cs similarity index 98% rename from uSync8.Core/Serialization/ISyncSerializer.cs rename to uSync.Core/Serialization/ISyncSerializer.cs index 9ed8060e..9d85d7bd 100644 --- a/uSync8.Core/Serialization/ISyncSerializer.cs +++ b/uSync.Core/Serialization/ISyncSerializer.cs @@ -4,9 +4,9 @@ using Umbraco.Core.Models.Entities; -using uSync8.Core.Models; +using uSync.Core.Models; -namespace uSync8.Core.Serialization +namespace uSync.Core.Serialization { public interface ISyncSerializerBase diff --git a/uSync8.Core/Serialization/SerializerFlags.cs b/uSync.Core/Serialization/SerializerFlags.cs similarity index 90% rename from uSync8.Core/Serialization/SerializerFlags.cs rename to uSync.Core/Serialization/SerializerFlags.cs index 5eb2db7b..6a42c867 100644 --- a/uSync8.Core/Serialization/SerializerFlags.cs +++ b/uSync.Core/Serialization/SerializerFlags.cs @@ -1,4 +1,4 @@ -namespace uSync8.Core.Serialization +namespace uSync.Core.Serialization { public enum SerializerFlags { diff --git a/uSync8.Core/Serialization/Serializers/ContentTypeBaseSerializer.cs b/uSync.Core/Serialization/Serializers/ContentTypeBaseSerializer.cs similarity index 71% rename from uSync8.Core/Serialization/Serializers/ContentTypeBaseSerializer.cs rename to uSync.Core/Serialization/Serializers/ContentTypeBaseSerializer.cs index 7fecd9f3..531b591c 100644 --- a/uSync8.Core/Serialization/Serializers/ContentTypeBaseSerializer.cs +++ b/uSync.Core/Serialization/Serializers/ContentTypeBaseSerializer.cs @@ -1,21 +1,20 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Web; +using System.Reflection; using System.Xml.Linq; -using NPoco.fastJSON; - using Umbraco.Core; using Umbraco.Core.Configuration; using Umbraco.Core.Logging; using Umbraco.Core.Models; -using Umbraco.Core.Models.Entities; using Umbraco.Core.Services; -using uSync8.Core.Extensions; -using uSync8.Core.Models; +using Umbraco.Core.Strings; + +using uSync.Core.Extensions; +using uSync.Core.Models; -namespace uSync8.Core.Serialization.Serializers +namespace uSync.Core.Serialization.Serializers { public abstract class ContentTypeBaseSerializer : SyncContainerSerializerBase where TObject : IContentTypeComposition @@ -24,15 +23,19 @@ public abstract class ContentTypeBaseSerializer : SyncContainerSerializ private readonly IContentTypeBaseService baseService; + protected readonly IShortStringHelper shortStringHelper; + protected ContentTypeBaseSerializer( IEntityService entityService, ILogger logger, IDataTypeService dataTypeService, IContentTypeBaseService baseService, + IShortStringHelper shortStringHelper, UmbracoObjectTypes containerType) : base(entityService, logger, containerType) { this.dataTypeService = dataTypeService; this.baseService = baseService; + this.shortStringHelper = shortStringHelper; } #region Serialization @@ -73,7 +76,7 @@ protected virtual XElement SerializeProperties(TObject item) { var node = new XElement("GenericProperties"); - foreach (var property in item.PropertyTypes.OrderBy(x => x.Alias)) + foreach (var property in item.PropertyTypes.Cast().OrderBy(x => x.Alias)) { var propNode = new XElement("GenericProperty", new XElement("Key", property.Key), @@ -105,7 +108,7 @@ protected virtual XElement SerializeProperties(TObject item) // added in v8.6 // reflection is fast but a a quick check of version is faster ! - if (UmbracoVersion.LocalVersion.Major > 8 || UmbracoVersion.LocalVersion.Minor >= 6) + // if (UmbracoVersion.LocalVersion.Major > 8 || UmbracoVersion.LocalVersion.Minor >= 6) { SerializeNewProperty(propNode, property, "MandatoryMessage"); SerializeNewProperty(propNode, property, "ValidationRegExpMessage"); @@ -136,7 +139,14 @@ protected void SerializeNewProperty(XElement node, PropertyType property var attempt = value.TryConvertTo(); if (attempt.Success) { - node.Add(new XElement(propertyName, attempt.Result)); + if (attempt.Result != null) + { + node.Add(new XElement(propertyName, attempt.Result)); + } + else + { + node.Add(new XElement(propertyName, string.Empty)); + } } } } @@ -151,7 +161,7 @@ protected XElement SerializeStructure(TObject item) { var node = new XElement("Structure"); List> items = new List>(); - + foreach (var allowedType in item.AllowedContentTypes.OrderBy(x => x.SortOrder)) { var allowedItem = FindItem(allowedType.Id.Value); @@ -181,71 +191,101 @@ protected XElement SerializeCompostions(ContentTypeCompositionBase item) #endregion #region Deserialization - - protected void DeserializeBase(TObject item, XElement node) + + protected IEnumerable DeserializeBase(TObject item, XElement node) { logger.Debug(serializerType, "Deserializing Base"); - if (node == null) return; + if (node == null) return Enumerable.Empty(); + + var info = node.Element("Info"); + if (info == null) return Enumerable.Empty(); + + List changes = new List(); var key = node.GetKey(); - if (item.Key != key) + if (item.Key != key) { + changes.AddUpdate("Key", item.Key, key, ""); item.Key = key; + } - var info = node.Element("Info"); - if (info == null) return; var alias = node.GetAlias(); if (item.Alias != alias) + { + changes.AddUpdate("Alias", item.Alias, alias, ""); item.Alias = alias; + } var name = info.Element("Name").ValueOrDefault(string.Empty); - if (!string.IsNullOrEmpty(name) && item.Name != name) + if (!string.IsNullOrEmpty(name) && item.Name != name) { + changes.AddUpdate("Name", item.Name, name, ""); item.Name = name; + } var icon = info.Element("Icon").ValueOrDefault(string.Empty); - if (item.Icon != icon) + if (item.Icon != icon) { + changes.AddUpdate("Icon", item.Icon, icon, ""); item.Icon = icon; + } var thumbnail = info.Element("Thumbnail").ValueOrDefault(string.Empty); - if (item.Thumbnail != thumbnail) + if (item.Thumbnail != thumbnail) { + changes.AddUpdate("Icon", item.Thumbnail, thumbnail, ""); item.Thumbnail = thumbnail; + } var description = info.Element("Description").ValueOrDefault(null); - if (item.Description != description) + if (item.Description != description) { + changes.AddUpdate("Description", item.Description, description, ""); item.Description = description; + } var allowedAsRoot = info.Element("AllowAtRoot").ValueOrDefault(false); if (item.AllowedAsRoot != allowedAsRoot) + { + changes.AddUpdate("AllowAtRoot", item.AllowedAsRoot, allowedAsRoot, ""); item.AllowedAsRoot = allowedAsRoot; + } var variations = info.Element("Variations").ValueOrDefault(ContentVariation.Nothing); if (item.Variations != variations) + { + changes.AddUpdate("Variations", item.Variations, variations, ""); item.Variations = variations; + } var isElement = info.Element("IsElement").ValueOrDefault(false); if (item.IsElement != isElement) + { + changes.AddUpdate("IsElement", item.IsElement, isElement, ""); item.IsElement = isElement; + } var isContainer = info.Element("IsListView").ValueOrDefault(false); if (item.IsContainer != isContainer) + { + changes.AddUpdate("IsListView", item.IsContainer, isContainer, ""); item.IsContainer = isContainer; + } if (!SetMasterFromElement(item, info.Element("Parent"))) { SetFolderFromElement(item, info.Element("Folder")); } + return changes; } - protected void DeserializeStructure(TObject item, XElement node) + protected IEnumerable DeserializeStructure(TObject item, XElement node) { logger.Debug(serializerType, "Deserializing Structure"); - var structure = node.Element("Structure"); - if (structure == null) return; + if (structure == null) return Enumerable.Empty(); + + var changes = new List(); List allowed = new List(); int sortOrder = 0; @@ -280,9 +320,7 @@ protected void DeserializeStructure(TObject item, XElement node) if (baseItem != null) { logger.Debug(serializerType, "Structure Found {0}", baseItem.Alias); - allowed.Add(new ContentTypeSort(baseItem.Id, itemSortOrder)); - sortOrder = itemSortOrder + 1; } } @@ -298,20 +336,20 @@ protected void DeserializeStructure(TObject item, XElement node) if (!currentHash.Equals(newHash)) { + changes.AddUpdate("Allowed", item.AllowedContentTypes.Select(x => x.Alias), allowed.Select(x => x.Alias), "/Structure"); logger.Debug(serializerType, "Updating allowed content types"); item.AllowedContentTypes = allowed; } + + return changes; } - protected void DeserializeProperties(TObject item, XElement node) + protected IEnumerable DeserializeProperties(TObject item, XElement node) { logger.Debug(serializerType, "Deserializing Properties"); - - if (node == null) return; - - var propertiesNode = node.Element("GenericProperties"); - if (propertiesNode == null) return; + var propertiesNode = node?.Element("GenericProperties"); + if (propertiesNode == null) return Enumerable.Empty(); /// there are something we can't do in the loop, /// so we store them and do them once we've put @@ -319,12 +357,14 @@ protected void DeserializeProperties(TObject item, XElement node) List propertiesToRemove = new List(); Dictionary propertiesToMove = new Dictionary(); + List changes = new List(); + foreach (var propertyNode in propertiesNode.Elements("GenericProperty")) { var alias = propertyNode.Element("Alias").ValueOrDefault(string.Empty); if (string.IsNullOrEmpty(alias)) continue; - var key = propertyNode.Element("Key").ValueOrDefault(alias.GetHashCode().ToGuid()); + var key = propertyNode.Element("Key").ValueOrDefault(Guid.Empty); var definitionKey = propertyNode.Element("Definition").ValueOrDefault(Guid.Empty); var propertyEditorAlias = propertyNode.Element("Type").ValueOrDefault(string.Empty); @@ -336,36 +376,69 @@ protected void DeserializeProperties(TObject item, XElement node) if (property == null) continue; if (key != Guid.Empty && property.Key != key) + { + changes.AddUpdate("Key", property.Key, key, $"{alias}/Key"); property.Key = key; + } + + if (property.Alias != alias) + { + changes.AddUpdate("Alias", property.Alias, alias, $"{alias}/Alias"); + property.Alias = alias; + } - // do we trust the core ? - because in theory - // we can set the value, and it will only - // be updated if marked dirty and that will - // only happen if the value is different ? + var name = propertyNode.Element("Name").ValueOrDefault(alias); + if (property.Name != name) + { + changes.AddUpdate("Name", property.Name, name, $"{alias}/Name"); + property.Name = name; + } - property.Alias = alias; - property.Name = propertyNode.Element("Name").ValueOrDefault(alias); - property.Description = propertyNode.Element("Description").ValueOrDefault(string.Empty); - property.Mandatory = propertyNode.Element("Mandatory").ValueOrDefault(false); - property.ValidationRegExp = propertyNode.Element("Validation").ValueOrDefault(string.Empty); - property.SortOrder = propertyNode.Element("SortOrder").ValueOrDefault(0); + var description = propertyNode.Element("Description").ValueOrDefault(string.Empty); + if (property.Description != description) + { + changes.AddUpdate("Description", property.Description, description, $"{alias}/Description"); + property.Description = description; + } + + var mandatory = propertyNode.Element("Mandatory").ValueOrDefault(false); + if (property.Mandatory != mandatory) + { + changes.AddUpdate("Mandatory", property.Mandatory, mandatory, $"{alias}/Mandatory"); + property.Mandatory = mandatory; + } + + var regEx = propertyNode.Element("Validation").ValueOrDefault(string.Empty); + if (property.ValidationRegExp != regEx) + { + changes.AddUpdate("Validation", property.ValidationRegExp, regEx, $"{alias}/RegEx"); + property.ValidationRegExp = propertyNode.Element("Validation").ValueOrDefault(string.Empty); + } + + var sortOrder = propertyNode.Element("SortOrder").ValueOrDefault(0); + if (property.SortOrder != sortOrder) + { + changes.AddUpdate("SortOrder", property.SortOrder, sortOrder, $"{alias}/SortOrder"); + property.SortOrder = sortOrder; + } // added in v8.6 // reflection is fast but a a quick check of version is faster ! - if (UmbracoVersion.LocalVersion.Major > 8 || UmbracoVersion.LocalVersion.Minor >= 6) + // if (UmbracoVersion.LocalVersion.Major > 8 || UmbracoVersion.LocalVersion.Minor >= 6) { - DeserializeNewProperty(property, propertyNode, "MandatoryMessage"); - DeserializeNewProperty(property, propertyNode, "ValidationRegExpMessage"); + changes.AddNotNull(DeserializeNewProperty(property, propertyNode, "MandatoryMessage")); + changes.AddNotNull(DeserializeNewProperty(property, propertyNode, "ValidationRegExpMessage")); } - - DeserializeExtraProperties(item, property, propertyNode); + changes.AddRange(DeserializeExtraProperties(item, property, propertyNode)); var tab = propertyNode.Element("Tab").ValueOrDefault(string.Empty); if (IsNew) { + changes.AddNew(alias, name, alias); logger.Debug(serializerType, "Property Is new adding to tab."); + if (string.IsNullOrWhiteSpace(tab)) { item.AddPropertyType(property); @@ -392,13 +465,17 @@ protected void DeserializeProperties(TObject item, XElement node) } } } + } // move things between tabs. - MoveProperties(item, propertiesToMove); + changes.AddRange(MoveProperties(item, propertiesToMove)); // remove what needs to be removed - RemoveProperties(item, propertiesNode); + changes.AddRange(RemoveProperties(item, propertiesNode)); + + return changes; + } /// @@ -408,7 +485,7 @@ protected void DeserializeProperties(TObject item, XElement node) /// using reflection to find properties that might have been added in later versions of umbraco. /// doing it this way means we can maintain backwards compatability. /// - protected void DeserializeNewProperty(PropertyType property, XElement node, string propertyName) + protected uSyncChange DeserializeNewProperty(PropertyType property, XElement node, string propertyName) { var propertyInfo = property?.GetType()?.GetProperty(propertyName); if (propertyInfo != null) @@ -417,25 +494,56 @@ protected void DeserializeNewProperty(PropertyType property, XElement no var attempt = value.TryConvertTo(); if (attempt.Success) { - propertyInfo.SetValue(property, attempt.Result); + var current = GetPropertyAs(propertyInfo, property); + + if (current == null || !current.Equals(attempt.Result)) + { + propertyInfo.SetValue(property, attempt.Result); + + return uSyncChange.Update($"property/{propertyName}", + propertyName, + current?.ToString() ?? "(Blank)", + attempt.Result.ToString()); + } } } + + return null; } - virtual protected void DeserializeExtraProperties(TObject item, PropertyType property, XElement node) + private TValue GetPropertyAs(PropertyInfo info, PropertyType property) { - // no op. + if (info == null) return default; + + var value = info.GetValue(property); + if (value == null) return default; + + var result = value.TryConvertTo(); + if (result.Success) + return result.Result; + + return default; + } - protected void DeserializeTabs(TObject item, XElement node) + + virtual protected IEnumerable DeserializeExtraProperties(TObject item, PropertyType property, XElement node) + { + // nothing. + return Enumerable.Empty(); + } + + protected IEnumerable DeserializeTabs(TObject item, XElement node) { logger.Debug(serializerType, "Deserializing Tabs"); var tabNode = node.Element("Tabs"); - if (tabNode == null) return; + if (tabNode == null) return Enumerable.Empty(); var defaultSort = 0; + var changes = new List(); + foreach (var tab in tabNode.Elements("Tab")) { var name = tab.Element("Caption").ValueOrDefault(string.Empty); @@ -444,8 +552,9 @@ protected void DeserializeTabs(TObject item, XElement node) logger.Debug(serializerType, "> Tab {0} {1}", name, sortOrder); var existing = item.PropertyGroups.FirstOrDefault(x => x.Name.InvariantEquals(name)); - if (existing != null) + if (existing != null && existing.SortOrder != sortOrder) { + changes.AddUpdate("SortOrder", existing.SortOrder, sortOrder, $"Tabs/{name}/SortOrder"); existing.SortOrder = sortOrder; } else @@ -453,6 +562,7 @@ protected void DeserializeTabs(TObject item, XElement node) // create the tab if (item.AddPropertyGroup(name)) { + changes.AddNew(name, name, $"Tabs/{name}"); var newTab = item.PropertyGroups.FirstOrDefault(x => x.Name.InvariantEquals(name)); if (newTab != null) { @@ -463,16 +573,17 @@ protected void DeserializeTabs(TObject item, XElement node) defaultSort = sortOrder + 1; } + + return changes; } - protected void CleanTabs(TObject item, XElement node) + protected IEnumerable CleanTabs(TObject item, XElement node) { logger.Debug(serializerType, "Cleaning Tabs Base"); - var tabNode = node.Element("Tabs"); - - if (tabNode == null) return; + var tabNode = node?.Element("Tabs"); + if (tabNode == null) return Enumerable.Empty(); var newTabs = tabNode.Elements("Tab") .Where(x => x.Element("Caption") != null) @@ -488,11 +599,22 @@ protected void CleanTabs(TObject item, XElement node) } } - foreach (var name in removals) + if (removals.Count > 0) { - logger.Debug(serializerType, "Removing {0}", name); - item.PropertyGroups.Remove(name); + var changes = new List(); + + foreach (var name in removals) + { + logger.Debug(serializerType, "Removing {0}", name); + changes.Add(uSyncChange.Delete($"Tabs/{name}", name, name)); + + item.PropertyGroups.Remove(name); + } + + return changes; } + + return Enumerable.Empty(); } protected void CleanFolder(TObject item, XElement node) @@ -516,12 +638,13 @@ protected void CleanFolder(TObject item, XElement node) } } - protected void DeserializeCompositions(TObject item, XElement node) + protected IEnumerable DeserializeCompositions(TObject item, XElement node) { logger.Debug(serializerType, "Deserializing Compositions"); - var comps = node.Element("Info").Element("Compositions"); - if (comps == null) return; + var comps = node?.Element("Info")?.Element("Compositions"); + if (comps == null) return Enumerable.Empty(); + List compositions = new List(); foreach (var compositionNode in comps.Elements("Composition")) @@ -537,7 +660,17 @@ protected void DeserializeCompositions(TObject item, XElement node) } if (!Enumerable.SequenceEqual(item.ContentTypeComposition, compositions)) + { + var change = uSyncChange.Update("Info", "Compositions", + string.Join(",", item.ContentTypeComposition.Select(x => x.Alias)), + string.Join(",", compositions.Select(x => x.Alias))); + item.ContentTypeComposition = compositions; + + return change.AsEnumerableOfOne(); + } + + return Enumerable.Empty(); } @@ -591,14 +724,14 @@ private PropertyType GetOrCreateProperty(TObject item, { // should we throw - not a valid sync file ? // or carry on with best endevours ? - property = item.PropertyTypes.SingleOrDefault(x => x.Key == key); + property = (PropertyType)item.PropertyTypes.SingleOrDefault(x => x.Key == key); } if (property == null) { // we should really say if we don't have the key! // but lets lookup by alias. - property = item.PropertyTypes.SingleOrDefault(x => x.Alias == alias); + property = (PropertyType)item.PropertyTypes.SingleOrDefault(x => x.Alias == alias); } var editorAlias = propertyEditorAlias; @@ -631,7 +764,7 @@ private PropertyType GetOrCreateProperty(TObject item, } else { - property = new PropertyType(dataType, alias); + property = new PropertyType(shortStringHelper, dataType, alias); IsNew = true; } } @@ -654,27 +787,30 @@ private PropertyType GetOrCreateProperty(TObject item, } - private void MoveProperties(IContentTypeBase item, IDictionary moves) + private IEnumerable MoveProperties(IContentTypeBase item, IDictionary moves) { logger.Debug(serializerType, "MoveProperties"); foreach (var move in moves) { item.MovePropertyType(move.Key, move.Value); + + yield return uSyncChange.Update($"{move.Key}/Tab/{move.Value}", move.Key, "", move.Value); } } - private void RemoveProperties(IContentTypeBase item, XElement properties) + private IEnumerable RemoveProperties(IContentTypeBase item, XElement properties) { logger.Debug(serializerType, "RemoveProperties"); List removals = new List(); var nodes = properties.Elements("GenericProperty") + .Where(x => x.Element("Key").ValueOrDefault(Guid.Empty) != Guid.Empty) .Select(x => new { - Key = (x.Element("Key").ValueOrDefault(Guid.NewGuid()) == Guid.Empty ? Guid.NewGuid() : x.Element("Key").ValueOrDefault(Guid.NewGuid())), + Key = x.Element("Key").ValueOrDefault(Guid.Empty), Alias = x.Element("Alias").ValueOrDefault(string.Empty) }) .ToDictionary(k => k.Key, a => a.Alias); @@ -689,14 +825,23 @@ private void RemoveProperties(IContentTypeBase item, XElement properties) if (removals.Any()) { + var changes = new List(); + foreach (var alias in removals) { // if you remove something with lots of // content this can timeout (still? - need to check on v8) logger.Debug(serializerType, "Removing {0}", alias); + + changes.Add(uSyncChange.Delete($"Property/{alias}", alias, "")); + item.RemovePropertyType(alias); } + + return changes; } + + return Enumerable.Empty(); } #endregion diff --git a/uSync8.Core/Serialization/Serializers/ContentTypeSerializer.cs b/uSync.Core/Serialization/Serializers/ContentTypeSerializer.cs similarity index 61% rename from uSync8.Core/Serialization/Serializers/ContentTypeSerializer.cs rename to uSync.Core/Serialization/Serializers/ContentTypeSerializer.cs index 1e743a8d..80cdae7b 100644 --- a/uSync8.Core/Serialization/Serializers/ContentTypeSerializer.cs +++ b/uSync.Core/Serialization/Serializers/ContentTypeSerializer.cs @@ -1,15 +1,20 @@ using System; using System.Collections.Generic; +using System.Drawing.Imaging; using System.Linq; using System.Xml.Linq; + +using Umbraco.Core; using Umbraco.Core.Logging; using Umbraco.Core.Models; using Umbraco.Core.Models.Entities; using Umbraco.Core.Services; -using uSync8.Core.Extensions; -using uSync8.Core.Models; +using Umbraco.Core.Strings; + +using uSync.Core.Extensions; +using uSync.Core.Models; -namespace uSync8.Core.Serialization.Serializers +namespace uSync.Core.Serialization.Serializers { [SyncSerializer("B3F7F247-6077-406D-8480-DB1004C8211C", "ContentTypeSerializer", uSyncConstants.Serialization.ContentType)] public class ContentTypeSerializer : ContentTypeBaseSerializer, ISyncOptionsSerializer @@ -21,8 +26,9 @@ public ContentTypeSerializer( IEntityService entityService, ILogger logger, IDataTypeService dataTypeService, IContentTypeService contentTypeService, + IShortStringHelper shortStringHelper, IFileService fileService) - : base(entityService, logger, dataTypeService, contentTypeService, UmbracoObjectTypes.DocumentTypeContainer) + : base(entityService, logger, dataTypeService, contentTypeService, shortStringHelper, UmbracoObjectTypes.DocumentTypeContainer) { this.contentTypeService = contentTypeService; this.fileService = fileService; @@ -91,75 +97,98 @@ private XElement SerailizeTemplates(IContentType item) protected override SyncAttempt DeserializeCore(XElement node, SyncSerializerOptions options) { - var item = FindOrCreate(node); + var attempt = FindOrCreate(node); + if (!attempt.Success) throw attempt.Exception; + + var item = attempt.Result; - DeserializeBase(item, node); + var details = new List(); - DeserializeTabs(item, node); - DeserializeProperties(item, node); + details.AddRange(DeserializeBase(item, node)); + details.AddRange(DeserializeTabs(item, node)); + details.AddRange(DeserializeProperties(item, node)); // content type only property stuff. - DeserializeContentTypeProperties(item, node); + details.AddRange(DeserializeContentTypeProperties(item, node)); // clean tabs - CleanTabs(item, node); + details.AddRange(CleanTabs(item, node)); // templates - DeserializeTemplates(item, node); + details.AddRange(DeserializeTemplates(item, node)); // contentTypeService.Save(item); - return SyncAttempt.Succeed( - item.Name, - item, - ChangeType.Import, - ""); + return SyncAttempt.Succeed(item.Name, item, ChangeType.Import, details); } - protected override void DeserializeExtraProperties(IContentType item, PropertyType property, XElement node) + protected override IEnumerable DeserializeExtraProperties(IContentType item, PropertyType property, XElement node) { - property.Variations = node.Element("Variations").ValueOrDefault(ContentVariation.Nothing); + var variations = node.Element("Variations").ValueOrDefault(ContentVariation.Nothing); + if (property.Variations != variations) + { + var change = uSyncChange.Update("Property/Variations", "Variations", property.Variations, variations); + + property.Variations = variations; + + return change.AsEnumerableOfOne(); + } + + return Enumerable.Empty(); } public override SyncAttempt DeserializeSecondPass(IContentType item, XElement node, SyncSerializerOptions options) { logger.Debug("Deserialize Second Pass {0}", item.Alias); - DeserializeCompositions(item, node); - DeserializeStructure(item, node); + var details = new List(); + details.AddRange(DeserializeCompositions(item, node)); + details.AddRange(DeserializeStructure(item, node)); if (!options.Flags.HasFlag(SerializerFlags.DoNotSave) && item.IsDirty()) contentTypeService.Save(item); CleanFolder(item, node); - return SyncAttempt.Succeed(item.Name, item, ChangeType.Import); + return SyncAttempt.Succeed(item.Name, item, ChangeType.Import, details); } - private void DeserializeContentTypeProperties(IContentType item, XElement node) + private IEnumerable DeserializeContentTypeProperties(IContentType item, XElement node) { - if (node == null) return; - var info = node.Element("Info"); - if (info == null) return; + var info = node?.Element("Info"); + if (info == null) return Enumerable.Empty(); - item.IsContainer = info.Element("IsListView").ValueOrDefault(false); + var changes = new List(); + + var isContainer = info.Element("IsListView").ValueOrDefault(false); + if (item.IsContainer != isContainer) { + changes.AddUpdate("IsListView", item.IsContainer, isContainer, "Info/IsListView"); + item.IsContainer = isContainer; + } var masterTemplate = info.Element("DefaultTemplate").ValueOrDefault(string.Empty); if (!string.IsNullOrEmpty(masterTemplate)) { var template = fileService.GetTemplate(masterTemplate); - if (template != null) + if (template != null && !Object.Equals(template, item.DefaultTemplate)) + { + changes.AddUpdate("DefaultTemplate", item.DefaultTemplate?.Alias ?? string.Empty, masterTemplate, "DefaultTemplate"); item.SetDefaultTemplate(template); + } } + + return changes; } - private void DeserializeTemplates(IContentType item, XElement node) + private IEnumerable DeserializeTemplates(IContentType item, XElement node) { - var templates = node.Element("Info").Element("AllowedTemplates"); - if (templates == null) return; + var templates = node?.Element("Info")?.Element("AllowedTemplates"); + if (templates == null) return Enumerable.Empty(); var allowedTemplates = new List(); + var changes = new List(); + foreach (var template in templates.Elements("Template")) { @@ -181,13 +210,24 @@ private void DeserializeTemplates(IContentType item, XElement node) } } + + var currentTemplates = string.Join(",", item.AllowedTemplates.Select(x => x.Alias).OrderBy(x => x)); + var newTemplates = string.Join(",", allowedTemplates.Select(x => x.Alias).OrderBy(x => x)); + + if (currentTemplates != newTemplates) + { + changes.AddUpdate("AllowedTemplates", currentTemplates, newTemplates, "AllowedTemplates"); + } + item.AllowedTemplates = allowedTemplates; + + return changes; } - protected override IContentType CreateItem(string alias, ITreeEntity parent, string itemType) + protected override Attempt CreateItem(string alias, ITreeEntity parent, string itemType) { - var item = new ContentType(-1) + var item = new ContentType(shortStringHelper, -1) { Alias = alias }; @@ -202,7 +242,7 @@ protected override IContentType CreateItem(string alias, ITreeEntity parent, str item.SetParent(parent); } - return item; + return Attempt.Succeed((IContentType)item); } protected override void SaveContainer(EntityContainer container) diff --git a/uSync8.Core/Serialization/Serializers/DataTypeSerializer.cs b/uSync.Core/Serialization/Serializers/DataTypeSerializer.cs similarity index 74% rename from uSync8.Core/Serialization/Serializers/DataTypeSerializer.cs rename to uSync.Core/Serialization/Serializers/DataTypeSerializer.cs index 481d4699..42a8e635 100644 --- a/uSync8.Core/Serialization/Serializers/DataTypeSerializer.cs +++ b/uSync.Core/Serialization/Serializers/DataTypeSerializer.cs @@ -1,63 +1,81 @@ -using Newtonsoft.Json; - -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Xml.Linq; +using Newtonsoft.Json; + +using Umbraco.Web.Composing; + using Umbraco.Core; -using Umbraco.Core.Composing; using Umbraco.Core.Logging; using Umbraco.Core.Models; using Umbraco.Core.Models.Entities; using Umbraco.Core.PropertyEditors; using Umbraco.Core.Services; -using uSync8.Core.DataTypes; -using uSync8.Core.Extensions; -using uSync8.Core.Models; +using uSync.Core.DataTypes; +using uSync.Core.Extensions; +using uSync.Core.Models; -namespace uSync8.Core.Serialization.Serializers +namespace uSync.Core.Serialization.Serializers { [SyncSerializer("C06E92B7-7440-49B7-B4D2-AF2BF4F3D75D", "DataType Serializer", uSyncConstants.Serialization.DataType)] public class DataTypeSerializer : SyncContainerSerializerBase, ISyncOptionsSerializer { private readonly IDataTypeService dataTypeService; private readonly ConfigurationSerializerCollection configurationSerializers; + private readonly DataEditorCollection dataEditors; + private readonly PropertyEditorCollection propertyEditors; public DataTypeSerializer(IEntityService entityService, ILogger logger, IDataTypeService dataTypeService, - ConfigurationSerializerCollection configurationSerializers) + ConfigurationSerializerCollection configurationSerializers, + DataEditorCollection dataEditors, + PropertyEditorCollection propertyEditors) : base(entityService, logger, UmbracoObjectTypes.DataTypeContainer) { this.dataTypeService = dataTypeService; this.configurationSerializers = configurationSerializers; + this.dataEditors = dataEditors; + this.propertyEditors = propertyEditors; } protected override SyncAttempt DeserializeCore(XElement node, SyncSerializerOptions options) { var info = node.Element("Info"); var name = info.Element("Name").ValueOrDefault(string.Empty); - var key = node.GetKey(); - var item = FindOrCreate(node); - if (item == null) throw new ArgumentException($"Cannot find underling datatype for {name}"); + var attempt = FindOrCreate(node); + if (!attempt.Success) + throw attempt.Exception; + + var details = new List(); + var item = attempt.Result; // basic if (item.Name != name) + { + details.AddUpdate("Name", item.Name, name, "Name"); item.Name = name; + } if (item.Key != key) + { + details.AddUpdate("Key", item.Key, key, "Key"); item.Key = key; + } + var editorAlias = info.Element("EditorAlias").ValueOrDefault(string.Empty); if (editorAlias != item.EditorAlias) { // change the editor type..... - var newEditor = Current.DataEditors.FirstOrDefault(x => x.Alias.InvariantEquals(editorAlias)); + var newEditor = dataEditors.FirstOrDefault(x => x.Alias.InvariantEquals(editorAlias)); if (newEditor != null) { + details.AddUpdate("EditorAlias", item.EditorAlias, editorAlias, "EditorAlias"); item.Editor = newEditor; } } @@ -68,54 +86,72 @@ protected override SyncAttempt DeserializeCore(XElement node, SyncSer // item.SortOrder = info.Element("SortOrder").ValueOrDefault(0); var dbType = info.Element("DatabaseType").ValueOrDefault(ValueStorageType.Nvarchar); if (item.DatabaseType != dbType) + { + details.AddUpdate("DatabaseType", item.DatabaseType, dbType, "DatabaseType"); item.DatabaseType = dbType; + } // config - DeserializeConfiguration(item, node); + details.AddRange(DeserializeConfiguration(item, node)); + details.AddNotNull(SetFolderFromElement(item, info.Element("Folder"))); - SetFolderFromElement(item, info.Element("Folder")); - - // save is responsiblity of caller - // dataTypeService.Save(item); - - return SyncAttempt.Succeed(item.Name, item, ChangeType.Import); + return SyncAttempt.Succeed(item.Name, item, ChangeType.Import, details); } - private void SetFolderFromElement(IDataType item, XElement folderNode) + private uSyncChange SetFolderFromElement(IDataType item, XElement folderNode) { var folder = folderNode.ValueOrDefault(string.Empty); - if (string.IsNullOrWhiteSpace(folder)) return; + if (string.IsNullOrWhiteSpace(folder)) return null; var container = FindFolder(folderNode.GetKey(), folder); if (container != null && container.Id != item.ParentId) { + var change = uSyncChange.Update("", "Folder", container.Id, item.ParentId); + item.SetParent(container); + + return change; } + + return null; } - private void DeserializeConfiguration(IDataType item, XElement node) + private IEnumerable DeserializeConfiguration(IDataType item, XElement node) { var config = node.Element("Config").ValueOrDefault(string.Empty); if (!string.IsNullOrWhiteSpace(config)) { + var changes = new List(); + var serializer = this.configurationSerializers.GetSerializer(item.EditorAlias); if (serializer == null) { var configObject = JsonConvert.DeserializeObject(config, item.Configuration.GetType()); if (!IsJsonEqual(item.Configuration, configObject)) + { + changes.AddUpdateJson("Config", item.Configuration, configObject, "Configuration"); item.Configuration = configObject; + } } else { logger.Verbose("Deserializing Config via {0}", serializer.Name); var configObject = serializer.DeserializeConfig(config, item.Configuration.GetType()); if (!IsJsonEqual(item.Configuration, configObject)) + { + changes.AddUpdateJson("Config", item.Configuration, configObject, "Configuration"); item.Configuration = configObject; + } } + + return changes; } + + return Enumerable.Empty(); + } /// @@ -183,10 +219,11 @@ private XElement SerializeConfiguration(IDataType item) } - protected override IDataType CreateItem(string alias, ITreeEntity parent, string itemType) + protected override Attempt CreateItem(string alias, ITreeEntity parent, string itemType) { var editorType = FindDataEditor(itemType); - if (editorType == null) return null; + if (editorType == null) + return Attempt.Fail(null, new ArgumentException($"(Missing Package?) DataEditor {itemType} is not installed")); var item = new DataType(editorType, -1) { @@ -196,11 +233,11 @@ protected override IDataType CreateItem(string alias, ITreeEntity parent, string if (parent != null) item.SetParent(parent); - return item; + return Attempt.Succeed((IDataType)item); } private IDataEditor FindDataEditor(string alias) - => Current.PropertyEditors.FirstOrDefault(x => x.Alias == alias); + => propertyEditors.FirstOrDefault(x => x.Alias == alias); protected override string GetItemBaseType(XElement node) => node.Element("Info").Element("EditorAlias").ValueOrDefault(string.Empty); diff --git a/uSync8.Core/Serialization/Serializers/LanguageSerializer.cs b/uSync.Core/Serialization/Serializers/LanguageSerializer.cs similarity index 74% rename from uSync8.Core/Serialization/Serializers/LanguageSerializer.cs rename to uSync.Core/Serialization/Serializers/LanguageSerializer.cs index edb0791a..61b21f47 100644 --- a/uSync8.Core/Serialization/Serializers/LanguageSerializer.cs +++ b/uSync.Core/Serialization/Serializers/LanguageSerializer.cs @@ -5,26 +5,33 @@ using System.Text; using System.Threading.Tasks; using System.Xml.Linq; + +using NPoco.Expressions; + using Umbraco.Core; +using Umbraco.Core.Configuration; using Umbraco.Core.Logging; using Umbraco.Core.Models; using Umbraco.Core.Services; -using uSync8.Core.Extensions; -using uSync8.Core.Models; +using uSync.Core.Extensions; +using uSync.Core.Models; -namespace uSync8.Core.Serialization.Serializers +namespace uSync.Core.Serialization.Serializers { [SyncSerializer("8D2381C3-A0F8-43A2-8563-6F12F9F48023", "Language Serializer", uSyncConstants.Serialization.Language, IsTwoPass = true)] public class LanguageSerializer : SyncSerializerBase, ISyncOptionsSerializer { private readonly ILocalizationService localizationService; + private readonly IGlobalSettings globalSettings; public LanguageSerializer(IEntityService entityService, ILogger logger, + IGlobalSettings globalSettings, ILocalizationService localizationService) : base(entityService, logger) { this.localizationService = localizationService; + this.globalSettings = globalSettings; } protected override SyncAttempt DeserializeCore(XElement node, SyncSerializerOptions options) @@ -34,35 +41,60 @@ protected override SyncAttempt DeserializeCore(XElement node, SyncSer var item = localizationService.GetLanguageByIsoCode(isoCode); + var details = new List(); + if (item == null) { logger.Debug("Creating New Language: {0}", isoCode); - item = new Language(isoCode); + item = new Language(globalSettings, isoCode); + details.AddNew(isoCode, isoCode, "Language"); } - item.IsoCode = isoCode; + if (item.IsoCode != isoCode) + { + details.AddUpdate("IsoCode", item.IsoCode, isoCode); + item.IsoCode = isoCode; + } try { var culture = CultureInfo.GetCultureInfo(isoCode); - item.CultureName = culture.DisplayName; + if (item.CultureName != culture.DisplayName) + { + details.AddUpdate("CultureName", item.CultureName, culture.DisplayName); + item.CultureName = culture.DisplayName; + } } catch { logger.Warn("Can't set culture name based on IsoCode"); } - item.IsDefault = node.Element("IsDefault").ValueOrDefault(false); - item.IsMandatory = node.Element("IsMandatory").ValueOrDefault(false); + var mandatory = node.Element("IsMandatory").ValueOrDefault(false); + if (item.IsMandatory != mandatory) + { + details.AddUpdate("IsMandatory", item.IsMandatory, mandatory); + item.IsMandatory = mandatory; + } + + var isDefault = node.Element("IsDefault").ValueOrDefault(false); + if (item.IsDefault != isDefault) + { + details.AddUpdate("IsDefault", item.IsDefault, isDefault); + item.IsDefault = isDefault; + } var fallbackId = GetFallbackLanguageId(item, node); - if (fallbackId > 0) + if (fallbackId > 0 && item.FallbackLanguageId != fallbackId) + { + details.AddUpdate("FallbackId", item.FallbackLanguageId, fallbackId); item.FallbackLanguageId = fallbackId; + } // logger.Debug("Saving Language"); //localizationService.Save(item); - return SyncAttempt.Succeed(item.CultureName, item, ChangeType.Import); + return SyncAttempt.Succeed(item.CultureName, item, ChangeType.Import, details); } /// @@ -71,16 +103,27 @@ protected override SyncAttempt DeserializeCore(XElement node, SyncSer public override SyncAttempt DeserializeSecondPass(ILanguage item, XElement node, SyncSerializerOptions options) { logger.Debug("Language Second Pass {IsoCode}", item.IsoCode); - item.IsDefault = node.Element("IsDefault").ValueOrDefault(false); + + var details = new List(); + + var isDefault = node.Element("IsDefault").ValueOrDefault(false); + if (item.IsDefault != isDefault) + { + details.AddUpdate("IsDefault", item.IsDefault, isDefault); + item.IsDefault = isDefault; + } var fallbackId = GetFallbackLanguageId(item, node); - if (fallbackId > 0) + if (fallbackId > 0 && item.FallbackLanguageId != fallbackId) + { + details.AddUpdate("FallbackId", item.FallbackLanguageId, fallbackId); item.FallbackLanguageId = fallbackId; + } if (!options.Flags.HasFlag(SerializerFlags.DoNotSave) && item.IsDirty()) localizationService.Save(item); - return SyncAttempt.Succeed(item.CultureName, item, ChangeType.Import); + return SyncAttempt.Succeed(item.CultureName, item, ChangeType.Import, details); } private int GetFallbackLanguageId(ILanguage item, XElement node) diff --git a/uSync8.Core/Serialization/Serializers/MacroSerializer.cs b/uSync.Core/Serialization/Serializers/MacroSerializer.cs similarity index 64% rename from uSync8.Core/Serialization/Serializers/MacroSerializer.cs rename to uSync.Core/Serialization/Serializers/MacroSerializer.cs index 6cf1e519..49736eba 100644 --- a/uSync8.Core/Serialization/Serializers/MacroSerializer.cs +++ b/uSync.Core/Serialization/Serializers/MacroSerializer.cs @@ -1,33 +1,38 @@ using System; using System.Collections.Generic; +using System.Drawing.Imaging; using System.Linq; -using System.Text; -using System.Threading.Tasks; using System.Xml.Linq; + using Umbraco.Core.Logging; using Umbraco.Core.Models; using Umbraco.Core.Services; -using uSync8.Core.Extensions; -using uSync8.Core.Models; +using Umbraco.Core.Strings; + +using uSync.Core.Extensions; +using uSync.Core.Models; -namespace uSync8.Core.Serialization.Serializers +namespace uSync.Core.Serialization.Serializers { [SyncSerializer("CBB3FDA1-F7B3-470E-B78F-EB316576C8C6", "Macro Serializer", uSyncConstants.Serialization.Macro)] public class MacroSerializer : SyncSerializerBase, ISyncOptionsSerializer { private readonly IMacroService macroService; + private readonly IShortStringHelper shortStringHelper; public MacroSerializer( IEntityService entityService, ILogger logger, - IMacroService macroService) + IMacroService macroService, + IShortStringHelper shortStringHelper) : base(entityService, logger) { this.macroService = macroService; + this.shortStringHelper = shortStringHelper; } protected override SyncAttempt DeserializeCore(XElement node, SyncSerializerOptions options) { - var changes = new List(); + var details = new List(); if (node.Element("Name") == null) throw new ArgumentNullException("XML missing Name parameter"); @@ -39,7 +44,9 @@ protected override SyncAttempt DeserializeCore(XElement node, SyncSerial var name = node.Element("Name").ValueOrDefault(string.Empty); var macroSource = node.Element("MacroSource").ValueOrDefault(string.Empty); - var macroType = node.Element("MacroType").ValueOrDefault(MacroTypes.PartialView); + + // TODO: Where has macroType gone? + // var macroType = node.Element("MacroType").ValueOrDefault(MacroTypes.PartialView); logger.Debug("Macro by Key [{0}]", key); item = macroService.GetById(key); @@ -53,22 +60,81 @@ protected override SyncAttempt DeserializeCore(XElement node, SyncSerial if (item == null) { logger.Debug("Creating New [{0}]", key); - item = new Macro(alias, name, macroSource, macroType); - changes.Add(uSyncChange.Create(alias, name, "New Macro")); + item = new Macro(shortStringHelper, alias, name, macroSource); + details.Add(uSyncChange.Create(alias, name, "New Macro")); + } + + if (item.Key != key) + { + details.AddUpdate("Key", item.Key, key); + item.Key = key; + } + + if (item.Name != name) + { + details.AddUpdate("Name", item.Name, name); + item.Name = name; + } + + if (item.Alias != alias) + { + details.AddUpdate("Alias", item.Alias, alias); + item.Alias = alias; } - item.Key = key; - item.Name = name; - item.Alias = alias; - item.MacroSource = macroSource; - item.MacroType = macroType; + if (item.MacroSource != macroSource) + { + details.AddUpdate("MacroSource", item.MacroSource, macroSource); + item.MacroSource = macroSource; + } + + // TODO: Workout where MacroType has gone + /* + if (item.MacroType != macroType) + { + details.AddUpdate("MacroType", item.MacroType, macroType); + item.MacroType = macroType; + } + */ + var useInEditor = node.Element("UseInEditor").ValueOrDefault(false); + var dontRender = node.Element("DontRender").ValueOrDefault(false); + var cacheByMember = node.Element("CachedByMember").ValueOrDefault(false); + var cacheByPage = node.Element("CachedByPage").ValueOrDefault(false); + var cacheDuration = node.Element("CachedDuration").ValueOrDefault(0); + + if (item.UseInEditor != useInEditor) + { + details.AddUpdate("UseInEditor", item.UseInEditor, useInEditor); + item.UseInEditor = useInEditor; + } + + if (item.DontRender != dontRender) + { + details.AddUpdate("DontRender", item.DontRender, dontRender); + item.DontRender = dontRender; + } + + if (item.CacheByMember != cacheByMember) + { + details.AddUpdate("CacheByMember", item.CacheByMember, cacheByMember); + item.CacheByMember = cacheByMember; + } + + + if (item.CacheByPage != cacheByPage) + { + details.AddUpdate("CacheByPage", item.CacheByPage, cacheByPage); + item.CacheByPage = cacheByPage; + } + + + if (item.CacheDuration != cacheDuration) + { + details.AddUpdate("CacheByMember", item.CacheDuration, cacheDuration); + item.CacheDuration = cacheDuration; + } - item.UseInEditor = node.Element("UseInEditor").ValueOrDefault(false); - item.DontRender = node.Element("DontRender").ValueOrDefault(false); - item.CacheByMember = node.Element("CachedByMember").ValueOrDefault(false); - item.CacheByPage = node.Element("CachedByPage").ValueOrDefault(false); - item.CacheDuration = node.Element("CachedDuration").ValueOrDefault(0); var properties = node.Element("Properties"); if (properties != null && properties.HasElements) @@ -93,8 +159,7 @@ protected override SyncAttempt DeserializeCore(XElement node, SyncSerial else { logger.Debug(" >> Adding {0}", propertyAlias); - - changes.Add(uSyncChange.Create(propPath, "Property", propertyAlias)); + details.Add(uSyncChange.Create(propPath, "Property", propertyAlias)); item.Properties.Add(new MacroProperty(propertyAlias, propertyName, sortOrder, editorAlias)); } } @@ -103,13 +168,7 @@ protected override SyncAttempt DeserializeCore(XElement node, SyncSerial RemoveOrphanProperties(item, properties); - // macroService.Save(item); - - var attempt = SyncAttempt.Succeed(item.Name, item, ChangeType.Import); - if (changes.Any()) - attempt.Details = changes; - - return attempt; + return SyncAttempt.Succeed(item.Name, item, ChangeType.Import, details); } private void RemoveOrphanProperties(IMacro item, XElement properties) @@ -144,7 +203,7 @@ protected override SyncAttempt SerializeCore(IMacro item, SyncSerializ node.Add(new XElement("Name", item.Name)); node.Add(new XElement("MacroSource", item.MacroSource)); - node.Add(new XElement("MacroType", item.MacroType)); + // node.Add(new XElement("MacroType", item.MacroType)); node.Add(new XElement("UseInEditor", item.UseInEditor)); node.Add(new XElement("DontRender", item.DontRender)); node.Add(new XElement("CachedByMember", item.CacheByMember)); diff --git a/uSync8.Core/Serialization/Serializers/MediaTypeSerializer.cs b/uSync.Core/Serialization/Serializers/MediaTypeSerializer.cs similarity index 69% rename from uSync8.Core/Serialization/Serializers/MediaTypeSerializer.cs rename to uSync.Core/Serialization/Serializers/MediaTypeSerializer.cs index 74aa59dc..bf451257 100644 --- a/uSync8.Core/Serialization/Serializers/MediaTypeSerializer.cs +++ b/uSync.Core/Serialization/Serializers/MediaTypeSerializer.cs @@ -1,13 +1,18 @@ using System; +using System.Collections.Generic; using System.Linq; using System.Xml.Linq; + +using Umbraco.Core; using Umbraco.Core.Logging; using Umbraco.Core.Models; using Umbraco.Core.Models.Entities; using Umbraco.Core.Services; -using uSync8.Core.Models; +using Umbraco.Core.Strings; + +using uSync.Core.Models; -namespace uSync8.Core.Serialization.Serializers +namespace uSync.Core.Serialization.Serializers { [SyncSerializer("B3073706-5037-4FBD-A015-DF38D61F2934", "MediaTypeSerializer", uSyncConstants.Serialization.MediaType)] public class MediaTypeSerializer : ContentTypeBaseSerializer, ISyncOptionsSerializer @@ -17,8 +22,9 @@ public class MediaTypeSerializer : ContentTypeBaseSerializer, ISyncO public MediaTypeSerializer( IEntityService entityService, ILogger logger, IDataTypeService dataTypeService, - IMediaTypeService mediaTypeService) - : base(entityService, logger, dataTypeService, mediaTypeService, UmbracoObjectTypes.MediaTypeContainer) + IMediaTypeService mediaTypeService, + IShortStringHelper shortStringHelper) + : base(entityService, logger, dataTypeService, mediaTypeService, shortStringHelper, UmbracoObjectTypes.MediaTypeContainer) { this.mediaTypeService = mediaTypeService; } @@ -57,40 +63,41 @@ protected override SyncAttempt DeserializeCore(XElement node, SyncSe if (!IsValid(node)) throw new ArgumentException("Invalid XML Format"); - var item = FindOrCreate(node); + var details = new List(); + + var attempt = FindOrCreate(node); + if (!attempt.Success) throw attempt.Exception; + + var item = attempt.Result; - DeserializeBase(item, node); - DeserializeTabs(item, node); + details.AddRange(DeserializeBase(item, node)); + details.AddRange(DeserializeTabs(item, node)); // mediaTypeService.Save(item); - DeserializeProperties(item, node); + details.AddRange(DeserializeProperties(item, node)); CleanTabs(item, node); - // mediaTypeService.Save(item); - - return SyncAttempt.Succeed( - item.Name, - item, - ChangeType.Import, - ""); + return SyncAttempt.Succeed(item.Name, item, ChangeType.Import, details); } public override SyncAttempt DeserializeSecondPass(IMediaType item, XElement node, SyncSerializerOptions options) { - DeserializeCompositions(item, node); - DeserializeStructure(item, node); + var details = new List(); + + details.AddRange(DeserializeCompositions(item, node)); + details.AddRange(DeserializeStructure(item, node)); if (!options.Flags.HasFlag(SerializerFlags.DoNotSave) && item.IsDirty()) mediaTypeService.Save(item); - return SyncAttempt.Succeed(item.Name, item, ChangeType.Import); + return SyncAttempt.Succeed(item.Name, item, ChangeType.Import, details); } - protected override IMediaType CreateItem(string alias, ITreeEntity parent, string itemType) + protected override Attempt CreateItem(string alias, ITreeEntity parent, string itemType) { - var item = new MediaType(-1) + var item = new MediaType(shortStringHelper, -1) { Alias = alias }; @@ -103,7 +110,7 @@ protected override IMediaType CreateItem(string alias, ITreeEntity parent, strin item.SetParent(parent); } - return item; + return Attempt.Succeed((IMediaType)item); } } } diff --git a/uSync8.Core/Serialization/Serializers/MemberTypeSerializer.cs b/uSync.Core/Serialization/Serializers/MemberTypeSerializer.cs similarity index 64% rename from uSync8.Core/Serialization/Serializers/MemberTypeSerializer.cs rename to uSync.Core/Serialization/Serializers/MemberTypeSerializer.cs index 86e9ae73..515ab860 100644 --- a/uSync8.Core/Serialization/Serializers/MemberTypeSerializer.cs +++ b/uSync.Core/Serialization/Serializers/MemberTypeSerializer.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using System.Linq; using System.Xml.Linq; @@ -7,10 +8,12 @@ using Umbraco.Core.Models; using Umbraco.Core.Models.Entities; using Umbraco.Core.Services; -using uSync8.Core.Extensions; -using uSync8.Core.Models; +using Umbraco.Core.Strings; -namespace uSync8.Core.Serialization.Serializers +using uSync.Core.Extensions; +using uSync.Core.Models; + +namespace uSync.Core.Serialization.Serializers { [SyncSerializer("F45B5C7B-C206-4971-858B-6D349E153ACE", "MemberTypeSerializer", uSyncConstants.Serialization.MemberType)] public class MemberTypeSerializer : ContentTypeBaseSerializer, ISyncOptionsSerializer @@ -20,8 +23,9 @@ public class MemberTypeSerializer : ContentTypeBaseSerializer, ISyn public MemberTypeSerializer( IEntityService entityService, ILogger logger, IDataTypeService dataTypeService, - IMemberTypeService memberTypeService) - : base(entityService, logger, dataTypeService, memberTypeService, UmbracoObjectTypes.Unknown) + IMemberTypeService memberTypeService, + IShortStringHelper shortStringHelper) + : base(entityService, logger, dataTypeService, memberTypeService, shortStringHelper, UmbracoObjectTypes.Unknown) { this.memberTypeService = memberTypeService; } @@ -76,7 +80,7 @@ protected override void SerializeExtraProperties(XElement node, IMemberType item // get removed when required. // - private static string[] buildInProperties = new string[] { + private static string[] buildInProperties = new string[] { "umbracoMemberApproved", "umbracoMemberComments", "umbracoMemberFailedPasswordAttempts", "umbracoMemberLastLockoutDate", "umbracoMemberLastLogin", "umbracoMemberLastPasswordChangeDate", "umbracoMemberLockedOut", "umbracoMemberPasswordRetrievalAnswer", "umbracoMemberPasswordRetrievalQuestion" @@ -85,12 +89,12 @@ protected override void SerializeExtraProperties(XElement node, IMemberType item protected override XElement SerializeProperties(IMemberType item) { var node = base.SerializeProperties(item); - foreach(var property in node.Elements("GenericProperty")) + foreach (var property in node.Elements("GenericProperty")) { var alias = property.Element("Alias").ValueOrDefault(string.Empty); if (!string.IsNullOrWhiteSpace(alias) && buildInProperties.InvariantContains(alias)) { - property.Element("Key").Value = alias.GetHashCode().ToGuid().ToString(); + property.Element("Key").Value = Guid.Empty.ToString(); } } return node; @@ -98,33 +102,56 @@ protected override XElement SerializeProperties(IMemberType item) protected override SyncAttempt DeserializeCore(XElement node, SyncSerializerOptions options) { - var item = FindOrCreate(node); + var attempt = FindOrCreate(node); + if (!attempt.Success) + throw attempt.Exception; + + var item = attempt.Result; - DeserializeBase(item, node); - DeserializeTabs(item, node); - DeserializeProperties(item, node); + var details = new List(); + + details.AddRange(DeserializeBase(item, node)); + details.AddRange(DeserializeTabs(item, node)); + details.AddRange(DeserializeProperties(item, node)); CleanTabs(item, node); // memberTypeService.Save(item); - return SyncAttempt.Succeed( - item.Name, - item, - ChangeType.Import, - ""); + return SyncAttempt.Succeed(item.Name, item, ChangeType.Import, details); } - protected override void DeserializeExtraProperties(IMemberType item, PropertyType property, XElement node) + protected override IEnumerable DeserializeExtraProperties(IMemberType item, PropertyType property, XElement node) { - item.SetMemberCanEditProperty(property.Alias, node.Element("CanEdit").ValueOrDefault(false)); - item.SetMemberCanViewProperty(property.Alias, node.Element("CanView").ValueOrDefault(false)); - item.SetIsSensitiveProperty(property.Alias, node.Element("IsSensitive").ValueOrDefault(true)); + var changes = new List(); + + var canEdit = node.Element("CanEdit").ValueOrDefault(false); + if (item.MemberCanEditProperty(property.Alias) != canEdit) + { + changes.AddUpdate("CanEdit", !canEdit, canEdit, $"{property.Alias}/CanEdit"); + item.SetMemberCanEditProperty(property.Alias, canEdit); + } + + var canView = node.Element("CanView").ValueOrDefault(false); + if (item.MemberCanViewProperty(property.Alias) != canView) + { + changes.AddUpdate("CanView", !canView, canView, $"{property.Alias}/CanView"); + item.SetMemberCanViewProperty(property.Alias, canView); + } + + var isSensitive = node.Element("IsSensitive").ValueOrDefault(true); + if (item.IsSensitiveProperty(property.Alias) != isSensitive) + { + changes.AddUpdate("IsSensitive", !isSensitive, isSensitive, $"{property.Alias}/IsSensitive"); + item.SetIsSensitiveProperty(property.Alias, isSensitive); + } + + return changes; } - protected override IMemberType CreateItem(string alias, ITreeEntity parent, string extra) + protected override Attempt CreateItem(string alias, ITreeEntity parent, string extra) { - var item = new MemberType(-1) + var item = new MemberType(shortStringHelper, -1) { Alias = alias }; @@ -138,7 +165,7 @@ protected override IMemberType CreateItem(string alias, ITreeEntity parent, stri } - return item; + return Attempt.Succeed((IMemberType)item); } } } diff --git a/uSync8.Core/Serialization/Serializers/TemplateSerializer.cs b/uSync.Core/Serialization/Serializers/TemplateSerializer.cs similarity index 80% rename from uSync8.Core/Serialization/Serializers/TemplateSerializer.cs rename to uSync.Core/Serialization/Serializers/TemplateSerializer.cs index 63bde91b..d181e117 100644 --- a/uSync8.Core/Serialization/Serializers/TemplateSerializer.cs +++ b/uSync.Core/Serialization/Serializers/TemplateSerializer.cs @@ -1,29 +1,35 @@ using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System.IO; using System.Xml.Linq; + +using Umbraco.Composing; using Umbraco.Core; using Umbraco.Core.IO; -using Umbraco.Core.Models; using Umbraco.Core.Logging; +using Umbraco.Core.Models; using Umbraco.Core.Services; -using uSync8.Core.Extensions; -using uSync8.Core.Models; +using Umbraco.Core.Strings; + +using uSync.Core.Extensions; +using uSync.Core.Models; -namespace uSync8.Core.Serialization.Serializers +using static Umbraco.Core.Constants; + +namespace uSync.Core.Serialization.Serializers { [SyncSerializer("D0E0769D-CCAE-47B4-AD34-4182C587B08A", "Template Serializer", uSyncConstants.Serialization.Template)] public class TemplateSerializer : SyncSerializerBase, ISyncOptionsSerializer { private readonly IFileService fileService; + private readonly IShortStringHelper shortStringHelper; public TemplateSerializer(IEntityService entityService, ILogger logger, - IFileService fileService) + IFileService fileService, IShortStringHelper shortStringHelper) : base(entityService, logger) { this.fileService = fileService; + this.shortStringHelper = shortStringHelper; } protected override SyncAttempt DeserializeCore(XElement node, SyncSerializerOptions options) @@ -34,7 +40,9 @@ protected override SyncAttempt DeserializeCore(XElement node, SyncSer var name = node.Element("Name").ValueOrDefault(string.Empty); var item = default(ITemplate); - if (key != Guid.Empty) + var details = new List(); + + if (key != Guid.Empty) item = fileService.GetTemplate(key); if (item == null) @@ -43,14 +51,16 @@ protected override SyncAttempt DeserializeCore(XElement node, SyncSer if (item == null) { // create - var templatePath = IOHelper.MapPath(SystemDirectories.MvcViews + "/" + alias.ToSafeFileName() + ".cshtml"); + var templatePath = Current.IOHelper.MapPath(SystemDirectories.MvcViews + Path.DirectorySeparatorChar + alias.ToSafeFileName(shortStringHelper) + ".cshtml"); if (System.IO.File.Exists(templatePath)) { logger.Debug("Reading {0} contents", templatePath); var content = System.IO.File.ReadAllText(templatePath); - item = new Template(name, alias); + item = new Template(shortStringHelper, name, alias); item.Path = templatePath; item.Content = content; + + details.AddNew(alias, alias, "Template"); } else { @@ -67,13 +77,22 @@ protected override SyncAttempt DeserializeCore(XElement node, SyncSer } if (item.Key != key) + { + details.AddUpdate("Key", item.Key, key); item.Key = key; + } if (item.Name != name) + { + details.AddUpdate("Name", item.Name, name); item.Name = name; + } if (item.Alias != alias) + { + details.AddUpdate("Alias", item.Alias, alias); item.Alias = alias; + } //var master = node.Element("Parent").ValueOrDefault(string.Empty); //if (master != string.Empty) @@ -86,18 +105,22 @@ protected override SyncAttempt DeserializeCore(XElement node, SyncSer // Deserialize now takes care of the save. // fileService.SaveTemplate(item); - return SyncAttempt.Succeed(item.Name, item, ChangeType.Import); + return SyncAttempt.Succeed(item.Name, item, ChangeType.Import, details); } public override SyncAttempt DeserializeSecondPass(ITemplate item, XElement node, SyncSerializerOptions options) { + var details = new List(); + var master = node.Element("Parent").ValueOrDefault(string.Empty); if (master != string.Empty && item.MasterTemplateAlias != master) { logger.Debug("Looking for master {0}", master); var masterItem = fileService.GetTemplate(master); - if (masterItem != null) + if (masterItem != null && item.MasterTemplateAlias != master) { + details.AddUpdate("Parent", item.MasterTemplateAlias, master); + logger.Debug("Setting Master {0}", masterItem.Alias); item.SetMasterTemplate(masterItem); @@ -106,7 +129,7 @@ public override SyncAttempt DeserializeSecondPass(ITemplate item, XEl } } - return SyncAttempt.Succeed(item.Name, item, ChangeType.Import); + return SyncAttempt.Succeed(item.Name, item, ChangeType.Import, details); } diff --git a/uSync8.Core/Serialization/SyncContainerSerializerBase.cs b/uSync.Core/Serialization/SyncContainerSerializerBase.cs similarity index 96% rename from uSync8.Core/Serialization/SyncContainerSerializerBase.cs rename to uSync.Core/Serialization/SyncContainerSerializerBase.cs index 4c4fc971..f5679fed 100644 --- a/uSync8.Core/Serialization/SyncContainerSerializerBase.cs +++ b/uSync.Core/Serialization/SyncContainerSerializerBase.cs @@ -10,9 +10,9 @@ using Umbraco.Core.Models; using Umbraco.Core.Models.Entities; using Umbraco.Core.Services; -using uSync8.Core.Extensions; +using uSync.Core.Extensions; -namespace uSync8.Core.Serialization +namespace uSync.Core.Serialization { public abstract class SyncContainerSerializerBase : SyncTreeSerializerBase @@ -26,11 +26,11 @@ public SyncContainerSerializerBase(IEntityService entityService, ILogger logger, this.containerType = containerType; } - protected override TObject FindOrCreate(XElement node) + protected override Attempt FindOrCreate(XElement node) { TObject item = FindItem(node); - if (item != null) return item; + if (item != null) return Attempt.Succeed(item); logger.Debug(serializerType, "FindOrCreate: Creating"); diff --git a/uSync8.Core/Serialization/SyncSerializerAttribute.cs b/uSync.Core/Serialization/SyncSerializerAttribute.cs similarity index 93% rename from uSync8.Core/Serialization/SyncSerializerAttribute.cs rename to uSync.Core/Serialization/SyncSerializerAttribute.cs index 17d6b0e1..3389ba57 100644 --- a/uSync8.Core/Serialization/SyncSerializerAttribute.cs +++ b/uSync.Core/Serialization/SyncSerializerAttribute.cs @@ -1,6 +1,6 @@ using System; -namespace uSync8.Core.Serialization +namespace uSync.Core.Serialization { public sealed class SyncSerializerAttribute : Attribute { diff --git a/uSync8.Core/Serialization/SyncSerializerBase.cs b/uSync.Core/Serialization/SyncSerializerBase.cs similarity index 93% rename from uSync8.Core/Serialization/SyncSerializerBase.cs rename to uSync.Core/Serialization/SyncSerializerBase.cs index 3a49c570..71c4b733 100644 --- a/uSync8.Core/Serialization/SyncSerializerBase.cs +++ b/uSync.Core/Serialization/SyncSerializerBase.cs @@ -4,7 +4,7 @@ using Umbraco.Core.Models.Entities; using Umbraco.Core.Services; -namespace uSync8.Core.Serialization +namespace uSync.Core.Serialization { public abstract class SyncSerializerBase : SyncSerializerRoot diff --git a/uSync8.Core/Serialization/SyncSerializerCollectionBuilder.cs b/uSync.Core/Serialization/SyncSerializerCollectionBuilder.cs similarity index 93% rename from uSync8.Core/Serialization/SyncSerializerCollectionBuilder.cs rename to uSync.Core/Serialization/SyncSerializerCollectionBuilder.cs index 6bc7ea1a..64191c76 100644 --- a/uSync8.Core/Serialization/SyncSerializerCollectionBuilder.cs +++ b/uSync.Core/Serialization/SyncSerializerCollectionBuilder.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using Umbraco.Core.Composing; -namespace uSync8.Core.Serialization +namespace uSync.Core.Serialization { public class SyncSerializerCollectionBuilder : LazyCollectionBuilderBase diff --git a/uSync8.Core/Serialization/SyncSerializerOptions.cs b/uSync.Core/Serialization/SyncSerializerOptions.cs similarity index 98% rename from uSync8.Core/Serialization/SyncSerializerOptions.cs rename to uSync.Core/Serialization/SyncSerializerOptions.cs index 5cc2b44e..71176fb1 100644 --- a/uSync8.Core/Serialization/SyncSerializerOptions.cs +++ b/uSync.Core/Serialization/SyncSerializerOptions.cs @@ -6,9 +6,9 @@ using Superpower.Model; using Umbraco.Core; -using uSync8.Core.Extensions; +using uSync.Core.Extensions; -namespace uSync8.Core.Serialization +namespace uSync.Core.Serialization { /// /// options class that can be passed to a serialize/deserialize method. diff --git a/uSync8.Core/Serialization/SyncSerializerRoot.cs b/uSync.Core/Serialization/SyncSerializerRoot.cs similarity index 98% rename from uSync8.Core/Serialization/SyncSerializerRoot.cs rename to uSync.Core/Serialization/SyncSerializerRoot.cs index c0faac9e..d5a01ac6 100644 --- a/uSync8.Core/Serialization/SyncSerializerRoot.cs +++ b/uSync.Core/Serialization/SyncSerializerRoot.cs @@ -1,21 +1,16 @@ using System; using System.Collections.Generic; -using System.Diagnostics; using System.IO; -using System.Linq; using System.Reflection; using System.Security.Cryptography; -using System.Text; -using System.Threading.Tasks; -using System.Web.UI; using System.Xml.Linq; using Umbraco.Core.Logging; -using uSync8.Core.Extensions; -using uSync8.Core.Models; +using uSync.Core.Extensions; +using uSync.Core.Models; -namespace uSync8.Core.Serialization +namespace uSync.Core.Serialization { public abstract class SyncSerializerRoot { @@ -125,7 +120,7 @@ public SyncAttempt Deserialize(XElement node, SyncSerializerOptions opt return result; } - return SyncAttempt.Succeed(node.GetAlias(), default(TObject), ChangeType.NoChange); + return SyncAttempt.Succeed(node.GetAlias(), ChangeType.NoChange); } [Obsolete("Deserialize with options for better config support")] diff --git a/uSync8.Core/Serialization/SyncTreeSerializerBase.cs b/uSync.Core/Serialization/SyncTreeSerializerBase.cs similarity index 93% rename from uSync8.Core/Serialization/SyncTreeSerializerBase.cs rename to uSync.Core/Serialization/SyncTreeSerializerBase.cs index e5505557..c7f3b25f 100644 --- a/uSync8.Core/Serialization/SyncTreeSerializerBase.cs +++ b/uSync.Core/Serialization/SyncTreeSerializerBase.cs @@ -1,11 +1,12 @@ using System; using System.Xml.Linq; +using Umbraco.Core; using Umbraco.Core.Logging; using Umbraco.Core.Models.Entities; using Umbraco.Core.Services; -namespace uSync8.Core.Serialization +namespace uSync.Core.Serialization { public abstract class SyncTreeSerializerBase : SyncSerializerBase where TObject : ITreeEntity @@ -15,7 +16,7 @@ protected SyncTreeSerializerBase(IEntityService entityService, ILogger logger) { } - protected abstract TObject CreateItem(string alias, ITreeEntity parent, string itemType); + protected abstract Attempt CreateItem(string alias, ITreeEntity parent, string itemType); #region Getters @@ -28,7 +29,7 @@ protected virtual string GetItemBaseType(XElement node) #region Finders // Finders - used on importing, getting things that are already there (or maybe not) - protected abstract TObject FindOrCreate(XElement node); + protected abstract Attempt FindOrCreate(XElement node); protected TObject FindItem(Guid key, string alias) { diff --git a/uSync8.Core/SyncActionType.cs b/uSync.Core/SyncActionType.cs similarity index 63% rename from uSync8.Core/SyncActionType.cs rename to uSync.Core/SyncActionType.cs index 620d5476..9e551876 100644 --- a/uSync8.Core/SyncActionType.cs +++ b/uSync.Core/SyncActionType.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace uSync8.Core +namespace uSync.Core { /// /// indicates what happened to an item to cause a ghost file diff --git a/uSync8.Core/SyncItemFactory.cs b/uSync.Core/SyncItemFactory.cs similarity index 82% rename from uSync8.Core/SyncItemFactory.cs rename to uSync.Core/SyncItemFactory.cs index 3b096549..2a8f76a4 100644 --- a/uSync8.Core/SyncItemFactory.cs +++ b/uSync.Core/SyncItemFactory.cs @@ -1,18 +1,12 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System.Collections.Generic; using System.Xml.Linq; -using NPoco.Expressions; +using uSync.Core.Dependency; +using uSync.Core.Models; +using uSync.Core.Serialization; +using uSync.Core.Tracking; -using uSync8.Core.Dependency; -using uSync8.Core.Models; -using uSync8.Core.Serialization; -using uSync8.Core.Tracking; - -namespace uSync8.Core +namespace uSync.Core { public class SyncItemFactory : ISyncItemFactory { diff --git a/uSync8.Core/Tracking/ISyncTracker.cs b/uSync.Core/Tracking/ISyncTracker.cs similarity index 86% rename from uSync8.Core/Tracking/ISyncTracker.cs rename to uSync.Core/Tracking/ISyncTracker.cs index e23ddc85..dc7dba3f 100644 --- a/uSync8.Core/Tracking/ISyncTracker.cs +++ b/uSync.Core/Tracking/ISyncTracker.cs @@ -5,10 +5,10 @@ using System.Threading.Tasks; using System.Xml.Linq; using Umbraco.Core.Models.Entities; -using uSync8.Core.Models; -using uSync8.Core.Serialization; +using uSync.Core.Models; +using uSync.Core.Serialization; -namespace uSync8.Core.Tracking +namespace uSync.Core.Tracking { public interface ISyncTrackerBase { } diff --git a/uSync8.Core/Tracking/Impliment/ContentTypeBaseTracker.cs b/uSync.Core/Tracking/Impliment/ContentTypeBaseTracker.cs similarity index 98% rename from uSync8.Core/Tracking/Impliment/ContentTypeBaseTracker.cs rename to uSync.Core/Tracking/Impliment/ContentTypeBaseTracker.cs index 33620b0f..de315bcf 100644 --- a/uSync8.Core/Tracking/Impliment/ContentTypeBaseTracker.cs +++ b/uSync.Core/Tracking/Impliment/ContentTypeBaseTracker.cs @@ -4,9 +4,9 @@ using System.Text; using System.Threading.Tasks; using Umbraco.Core.Models; -using uSync8.Core.Serialization; +using uSync.Core.Serialization; -namespace uSync8.Core.Tracking.Impliment +namespace uSync.Core.Tracking.Impliment { public class ContentTypeBaseTracker : SyncBaseTracker where TObject : IContentTypeBase diff --git a/uSync8.Core/Tracking/Impliment/ContentTypeTracker.cs b/uSync.Core/Tracking/Impliment/ContentTypeTracker.cs similarity index 97% rename from uSync8.Core/Tracking/Impliment/ContentTypeTracker.cs rename to uSync.Core/Tracking/Impliment/ContentTypeTracker.cs index 8e0e9dad..7aabd656 100644 --- a/uSync8.Core/Tracking/Impliment/ContentTypeTracker.cs +++ b/uSync.Core/Tracking/Impliment/ContentTypeTracker.cs @@ -4,9 +4,9 @@ using System.Text; using System.Threading.Tasks; using Umbraco.Core.Models; -using uSync8.Core.Serialization; +using uSync.Core.Serialization; -namespace uSync8.Core.Tracking.Impliment +namespace uSync.Core.Tracking.Impliment { public class ContentTypeTracker : ContentTypeBaseTracker, ISyncTracker { diff --git a/uSync8.Core/Tracking/Impliment/DataTypeTracker.cs b/uSync.Core/Tracking/Impliment/DataTypeTracker.cs similarity index 94% rename from uSync8.Core/Tracking/Impliment/DataTypeTracker.cs rename to uSync.Core/Tracking/Impliment/DataTypeTracker.cs index 680c6311..2aebe6c2 100644 --- a/uSync8.Core/Tracking/Impliment/DataTypeTracker.cs +++ b/uSync.Core/Tracking/Impliment/DataTypeTracker.cs @@ -4,9 +4,9 @@ using System.Text; using System.Threading.Tasks; using Umbraco.Core.Models; -using uSync8.Core.Serialization; +using uSync.Core.Serialization; -namespace uSync8.Core.Tracking.Impliment +namespace uSync.Core.Tracking.Impliment { public class DataTypeTracker : SyncBaseTracker, ISyncTracker { diff --git a/uSync8.Core/Tracking/Impliment/LanguageTracker.cs b/uSync.Core/Tracking/Impliment/LanguageTracker.cs similarity index 92% rename from uSync8.Core/Tracking/Impliment/LanguageTracker.cs rename to uSync.Core/Tracking/Impliment/LanguageTracker.cs index 3d6273b4..72e3fb4e 100644 --- a/uSync8.Core/Tracking/Impliment/LanguageTracker.cs +++ b/uSync.Core/Tracking/Impliment/LanguageTracker.cs @@ -4,9 +4,9 @@ using System.Text; using System.Threading.Tasks; using Umbraco.Core.Models; -using uSync8.Core.Serialization; +using uSync.Core.Serialization; -namespace uSync8.Core.Tracking.Impliment +namespace uSync.Core.Tracking.Impliment { public class LanguageTracker : SyncBaseTracker, ISyncTracker { diff --git a/uSync8.Core/Tracking/Impliment/MacroTracker.cs b/uSync.Core/Tracking/Impliment/MacroTracker.cs similarity index 96% rename from uSync8.Core/Tracking/Impliment/MacroTracker.cs rename to uSync.Core/Tracking/Impliment/MacroTracker.cs index c67187cb..72398fdd 100644 --- a/uSync8.Core/Tracking/Impliment/MacroTracker.cs +++ b/uSync.Core/Tracking/Impliment/MacroTracker.cs @@ -4,9 +4,9 @@ using System.Text; using System.Threading.Tasks; using Umbraco.Core.Models; -using uSync8.Core.Serialization; +using uSync.Core.Serialization; -namespace uSync8.Core.Tracking.Impliment +namespace uSync.Core.Tracking.Impliment { public class MacroTracker : SyncBaseTracker, ISyncTracker { diff --git a/uSync8.Core/Tracking/Impliment/MediaTypeTracker.cs b/uSync.Core/Tracking/Impliment/MediaTypeTracker.cs similarity index 93% rename from uSync8.Core/Tracking/Impliment/MediaTypeTracker.cs rename to uSync.Core/Tracking/Impliment/MediaTypeTracker.cs index 82313965..830d78ba 100644 --- a/uSync8.Core/Tracking/Impliment/MediaTypeTracker.cs +++ b/uSync.Core/Tracking/Impliment/MediaTypeTracker.cs @@ -4,9 +4,9 @@ using System.Text; using System.Threading.Tasks; using Umbraco.Core.Models; -using uSync8.Core.Serialization; +using uSync.Core.Serialization; -namespace uSync8.Core.Tracking.Impliment +namespace uSync.Core.Tracking.Impliment { public class MediaTypeTracker : ContentTypeBaseTracker, ISyncTracker { diff --git a/uSync8.Core/Tracking/Impliment/MemberTypeTracker.cs b/uSync.Core/Tracking/Impliment/MemberTypeTracker.cs similarity index 94% rename from uSync8.Core/Tracking/Impliment/MemberTypeTracker.cs rename to uSync.Core/Tracking/Impliment/MemberTypeTracker.cs index c3880c8e..b0f5b94f 100644 --- a/uSync8.Core/Tracking/Impliment/MemberTypeTracker.cs +++ b/uSync.Core/Tracking/Impliment/MemberTypeTracker.cs @@ -4,9 +4,9 @@ using System.Text; using System.Threading.Tasks; using Umbraco.Core.Models; -using uSync8.Core.Serialization; +using uSync.Core.Serialization; -namespace uSync8.Core.Tracking.Impliment +namespace uSync.Core.Tracking.Impliment { public class MemberTypeTracker : ContentTypeBaseTracker, ISyncTracker { diff --git a/uSync8.Core/Tracking/Impliment/TemplateTracker.cs b/uSync.Core/Tracking/Impliment/TemplateTracker.cs similarity index 85% rename from uSync8.Core/Tracking/Impliment/TemplateTracker.cs rename to uSync.Core/Tracking/Impliment/TemplateTracker.cs index d432773a..47e07e75 100644 --- a/uSync8.Core/Tracking/Impliment/TemplateTracker.cs +++ b/uSync.Core/Tracking/Impliment/TemplateTracker.cs @@ -5,11 +5,11 @@ using System.Threading.Tasks; using System.Xml.Linq; using Umbraco.Core.Models; -using uSync8.Core.Extensions; -using uSync8.Core.Models; -using uSync8.Core.Serialization; +using uSync.Core.Extensions; +using uSync.Core.Models; +using uSync.Core.Serialization; -namespace uSync8.Core.Tracking.Impliment +namespace uSync.Core.Tracking.Impliment { public class TemplateTracker : SyncBaseTracker, ISyncTracker { diff --git a/uSync8.Core/Tracking/SyncBaseTracker.cs b/uSync.Core/Tracking/SyncBaseTracker.cs similarity index 97% rename from uSync8.Core/Tracking/SyncBaseTracker.cs rename to uSync.Core/Tracking/SyncBaseTracker.cs index 0ccb7229..58db8f82 100644 --- a/uSync8.Core/Tracking/SyncBaseTracker.cs +++ b/uSync.Core/Tracking/SyncBaseTracker.cs @@ -1,20 +1,20 @@ using System; using System.Collections.Generic; -using System.Diagnostics; -using System.IO; using System.Linq; using System.Xml.Linq; using System.Xml.XPath; + using Newtonsoft.Json; using Newtonsoft.Json.Linq; + using Umbraco.Core; -using Umbraco.Core.IO; using Umbraco.Core.Models.Entities; -using uSync8.Core.Extensions; -using uSync8.Core.Models; -using uSync8.Core.Serialization; -namespace uSync8.Core.Tracking +using uSync.Core.Extensions; +using uSync.Core.Models; +using uSync.Core.Serialization; + +namespace uSync.Core.Tracking { public abstract class SyncBaseTracker where TObject : IEntity @@ -41,21 +41,12 @@ public virtual IEnumerable GetChanges(XElement node, SyncSerializer if (!serializer.IsValid(node)) { // not valid - return new uSyncChange() - { - Change = ChangeDetailType.Error, - Name = "Invalid File", - OldValue = node.Name.LocalName - }.AsEnumerableOfOne(); ; + return uSyncChange.Error("", "Invalid File", node.Name.LocalName).AsEnumerableOfOne(); } if (serializer.IsCurrent(node) == ChangeType.NoChange) { - return new uSyncChange() - { - Change = ChangeDetailType.NoChange, - Name = node.GetAlias(), - }.AsEnumerableOfOne(); + return uSyncChange.NoChange("", node.GetAlias()).AsEnumerableOfOne(); } var changes = TrackChanges(); diff --git a/uSync8.Core/Tracking/SyncTrackerCollection.cs b/uSync.Core/Tracking/SyncTrackerCollection.cs similarity index 94% rename from uSync8.Core/Tracking/SyncTrackerCollection.cs rename to uSync.Core/Tracking/SyncTrackerCollection.cs index 8b84d3bf..efd70421 100644 --- a/uSync8.Core/Tracking/SyncTrackerCollection.cs +++ b/uSync.Core/Tracking/SyncTrackerCollection.cs @@ -4,10 +4,10 @@ using Umbraco.Core.Composing; -using uSync8.Core.Models; -using uSync8.Core.Serialization; +using uSync.Core.Models; +using uSync.Core.Serialization; -namespace uSync8.Core.Tracking +namespace uSync.Core.Tracking { public class SyncTrackerCollection : BuilderCollectionBase diff --git a/uSync.Core/uSync.Core.csproj b/uSync.Core/uSync.Core.csproj new file mode 100644 index 00000000..e69d7e34 --- /dev/null +++ b/uSync.Core/uSync.Core.csproj @@ -0,0 +1,12 @@ + + + + netstandard2.0 + + + + + + + + diff --git a/uSync.Core/uSync8Core.cs b/uSync.Core/uSync8Core.cs new file mode 100644 index 00000000..a1981b8b --- /dev/null +++ b/uSync.Core/uSync8Core.cs @@ -0,0 +1,9 @@ +namespace uSync.Core +{ + /// + /// Placeholder. + /// + public class uSync8Core + { + } +} diff --git a/uSync8.Core/uSyncConstants.cs b/uSync.Core/uSyncConstants.cs similarity index 92% rename from uSync8.Core/uSyncConstants.cs rename to uSync.Core/uSyncConstants.cs index b38a4915..22a78666 100644 --- a/uSync8.Core/uSyncConstants.cs +++ b/uSync.Core/uSyncConstants.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace uSync8.Core +namespace uSync.Core { public static partial class uSyncConstants { diff --git a/uSync.Core/uSyncCoreComposer.cs b/uSync.Core/uSyncCoreComposer.cs new file mode 100644 index 00000000..e207a9fb --- /dev/null +++ b/uSync.Core/uSyncCoreComposer.cs @@ -0,0 +1,46 @@ +using Umbraco.Core; +using Umbraco.Core.Composing; +using Umbraco.Core.Models; + +using uSync.Core.DataTypes; +using uSync.Core.Dependency; +using uSync.Core.Serialization; +using uSync.Core.Serialization.Serializers; +using uSync.Core.Tracking; + +namespace uSync.Core +{ + public class uSyncCoreComposer : IUserComposer + { + public void Compose(Composition composition) + { + // register *all* ConfigurationSerializers except those marked [HideFromTypeFinder] + // has to happen before the DataTypeSerializer is loaded, because that is where + // they are used + composition.WithCollectionBuilder() + .Add(() => composition.TypeLoader.GetTypes()); + + // register the core handlers (we will refactor to make this dynamic) + composition.Register, ContentTypeSerializer>(); + composition.Register, MediaTypeSerializer>(); + composition.Register, MemberTypeSerializer>(); + composition.Register, TemplateSerializer>(); + composition.Register, LanguageSerializer>(); + composition.Register, MacroSerializer>(); + composition.Register, DataTypeSerializer>(); + + // the trackers, allow us to be more nuanced in tracking changes, should + // mean change messages are better. + composition.WithCollectionBuilder() + .Add(composition.TypeLoader.GetTypes()); + + // load the dependency checkers from a collection + // allows us to extend checkers without changing the core. + composition.WithCollectionBuilder() + .Add(composition.TypeLoader.GetTypes()); + + // item factory, makes all the constructors of handlers way simpler + composition.Register(); + } + } +} diff --git a/uSync8.Core/uSyncObjectType.cs b/uSync.Core/uSyncObjectType.cs similarity index 82% rename from uSync8.Core/uSyncObjectType.cs rename to uSync.Core/uSyncObjectType.cs index f435e91f..5a6cda3c 100644 --- a/uSync8.Core/uSyncObjectType.cs +++ b/uSync.Core/uSyncObjectType.cs @@ -1,28 +1,24 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; + using Umbraco.Core; using Umbraco.Core.Models; + using static Umbraco.Core.Constants; -namespace uSync8.Core -{ +namespace uSync.Core +{ /// we are wrapping and extending Udi's /// the internal functions throw if you don't know the type - /// so here we capture and add... - /// + /// so here we capture and add return Unknown. public static class uSyncObjectType { public const string File = "physical-file"; - public static UmbracoObjectTypes ToUmbracoObjectType(string entityType) { try { - return UdiEntityType.ToUmbracoObjectType(entityType); + return UdiEntityTypeHelper.ToUmbracoObjectType(entityType); } catch(NotSupportedException) { @@ -32,6 +28,9 @@ public static UmbracoObjectTypes ToUmbracoObjectType(string entityType) } } + /// + /// Get the type of container that is used for this entity type. + /// public static UmbracoObjectTypes ToContainerUmbracoObjectType(string entityType) { switch(entityType) diff --git a/uSync.Site/Program.cs b/uSync.Site/Program.cs new file mode 100644 index 00000000..0fba6763 --- /dev/null +++ b/uSync.Site/Program.cs @@ -0,0 +1,21 @@ +using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.Hosting; +using Umbraco.Core.Composing; + +namespace uSync.Site +{ + public class Program + { + public static void Main(string[] args) + { + CreateHostBuilder(args) + .Build() + .Run(); + } + + public static IHostBuilder CreateHostBuilder(string[] args) => + Host.CreateDefaultBuilder(args) + .ConfigureWebHostDefaults(webBuilder => { webBuilder.UseStartup(); }) + .UseUmbraco(); + } +} diff --git a/uSync.Site/Properties/launchSettings.json b/uSync.Site/Properties/launchSettings.json new file mode 100644 index 00000000..ceb12627 --- /dev/null +++ b/uSync.Site/Properties/launchSettings.json @@ -0,0 +1,27 @@ +{ + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:49471/", + "sslPort": 44348 + } + }, + "profiles": { + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "uSync.Site": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "https://localhost:5001;http://localhost:5000" + } + } +} \ No newline at end of file diff --git a/uSync.Site/Startup.cs b/uSync.Site/Startup.cs new file mode 100644 index 00000000..a130b2ba --- /dev/null +++ b/uSync.Site/Startup.cs @@ -0,0 +1,48 @@ +using System; +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Umbraco.Extensions; + +namespace uSync.Site +{ + public class Startup + { + private readonly IWebHostEnvironment _env; + private readonly IConfiguration _config; + + /// + /// Constructor + /// + /// The Web Host Environment + /// The Configuration + /// + /// Only a few services are possible to be injected here https://github.com/dotnet/aspnetcore/issues/9337 + /// + public Startup(IWebHostEnvironment webHostEnvironment, IConfiguration config) + { + _env = webHostEnvironment ?? throw new ArgumentNullException(nameof(webHostEnvironment)); + _config = config ?? throw new ArgumentNullException(nameof(config)); + } + + // This method gets called by the runtime. Use this method to add services to the container. + // For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940 + public void ConfigureServices(IServiceCollection services) + { + services.AddUmbraco(_env, _config); + } + + // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. + public void Configure(IApplicationBuilder app) + { + if (_env.IsDevelopment()) + { + app.UseDeveloperExceptionPage(); + } + + app.UseUmbraco(); + } + } +} diff --git a/uSync.Site/Views/Blog.cshtml b/uSync.Site/Views/Blog.cshtml new file mode 100644 index 00000000..a931a087 --- /dev/null +++ b/uSync.Site/Views/Blog.cshtml @@ -0,0 +1,4 @@ +@inherits Umbraco.Web.Common.AspNetCore.UmbracoViewPage +@{ + Layout = null; +} \ No newline at end of file diff --git a/uSync.Site/Views/Blogpost.cshtml b/uSync.Site/Views/Blogpost.cshtml new file mode 100644 index 00000000..a931a087 --- /dev/null +++ b/uSync.Site/Views/Blogpost.cshtml @@ -0,0 +1,4 @@ +@inherits Umbraco.Web.Common.AspNetCore.UmbracoViewPage +@{ + Layout = null; +} \ No newline at end of file diff --git a/uSync.Site/Views/Person.cshtml b/uSync.Site/Views/Person.cshtml new file mode 100644 index 00000000..a931a087 --- /dev/null +++ b/uSync.Site/Views/Person.cshtml @@ -0,0 +1,4 @@ +@inherits Umbraco.Web.Common.AspNetCore.UmbracoViewPage +@{ + Layout = null; +} \ No newline at end of file diff --git a/uSync.Site/Views/Product.cshtml b/uSync.Site/Views/Product.cshtml new file mode 100644 index 00000000..a931a087 --- /dev/null +++ b/uSync.Site/Views/Product.cshtml @@ -0,0 +1,4 @@ +@inherits Umbraco.Web.Common.AspNetCore.UmbracoViewPage +@{ + Layout = null; +} \ No newline at end of file diff --git a/uSync.Site/Views/Products.cshtml b/uSync.Site/Views/Products.cshtml new file mode 100644 index 00000000..a931a087 --- /dev/null +++ b/uSync.Site/Views/Products.cshtml @@ -0,0 +1,4 @@ +@inherits Umbraco.Web.Common.AspNetCore.UmbracoViewPage +@{ + Layout = null; +} \ No newline at end of file diff --git a/uSync.Site/Views/SimpleDocType.cshtml b/uSync.Site/Views/SimpleDocType.cshtml new file mode 100644 index 00000000..3fa17ab5 --- /dev/null +++ b/uSync.Site/Views/SimpleDocType.cshtml @@ -0,0 +1,4 @@ +@inherits Umbraco.Web.Common.AspNetCore.UmbracoViewPage +@{ + Layout = null; +} \ No newline at end of file diff --git a/uSync8.Site/Views/Web.config b/uSync.Site/Views/Web.config similarity index 95% rename from uSync8.Site/Views/Web.config rename to uSync.Site/Views/Web.config index 74f4501d..1b33af64 100644 --- a/uSync8.Site/Views/Web.config +++ b/uSync.Site/Views/Web.config @@ -6,14 +6,7 @@
- - - - - - - - + @@ -30,14 +23,17 @@ - + + - + + - + + @@ -69,4 +65,5 @@ - \ No newline at end of file + + \ No newline at end of file diff --git a/uSync.Site/Views/contact.cshtml b/uSync.Site/Views/contact.cshtml new file mode 100644 index 00000000..a931a087 --- /dev/null +++ b/uSync.Site/Views/contact.cshtml @@ -0,0 +1,4 @@ +@inherits Umbraco.Web.Common.AspNetCore.UmbracoViewPage +@{ + Layout = null; +} \ No newline at end of file diff --git a/uSync.Site/Views/contentPage.cshtml b/uSync.Site/Views/contentPage.cshtml new file mode 100644 index 00000000..a931a087 --- /dev/null +++ b/uSync.Site/Views/contentPage.cshtml @@ -0,0 +1,4 @@ +@inherits Umbraco.Web.Common.AspNetCore.UmbracoViewPage +@{ + Layout = null; +} \ No newline at end of file diff --git a/uSync.Site/Views/home.cshtml b/uSync.Site/Views/home.cshtml new file mode 100644 index 00000000..a931a087 --- /dev/null +++ b/uSync.Site/Views/home.cshtml @@ -0,0 +1,4 @@ +@inherits Umbraco.Web.Common.AspNetCore.UmbracoViewPage +@{ + Layout = null; +} \ No newline at end of file diff --git a/uSync.Site/Views/master.cshtml b/uSync.Site/Views/master.cshtml new file mode 100644 index 00000000..a931a087 --- /dev/null +++ b/uSync.Site/Views/master.cshtml @@ -0,0 +1,4 @@ +@inherits Umbraco.Web.Common.AspNetCore.UmbracoViewPage +@{ + Layout = null; +} \ No newline at end of file diff --git a/uSync.Site/Views/people.cshtml b/uSync.Site/Views/people.cshtml new file mode 100644 index 00000000..a931a087 --- /dev/null +++ b/uSync.Site/Views/people.cshtml @@ -0,0 +1,4 @@ +@inherits Umbraco.Web.Common.AspNetCore.UmbracoViewPage +@{ + Layout = null; +} \ No newline at end of file diff --git a/uSync.Site/appsettings.Development.json b/uSync.Site/appsettings.Development.json new file mode 100644 index 00000000..9f81927b --- /dev/null +++ b/uSync.Site/appsettings.Development.json @@ -0,0 +1,16 @@ +{ + "Umbraco": { + "CMS": { + "Global":{ + "Smtp": { + "From": "your@email.here", + "Host": "localhost", + "Port": "25" + } + }, + "Hosting":{ + "Debug": true + } + } + } +} diff --git a/uSync.Site/appsettings.json b/uSync.Site/appsettings.json new file mode 100644 index 00000000..085ca9ab --- /dev/null +++ b/uSync.Site/appsettings.json @@ -0,0 +1,60 @@ +{ + "ConnectionStrings": { + "umbracoDbDSN": "Server=DESKTOP-2AFFJ8C\\SQLEXPRESS;Database=uSyncSite;Integrated Security=true" + }, + "Umbraco": { + "CMS": { + "Content": { + "Notifications": { + "Email": "your@email.here" + }, + "MacroErrors": "throw" + }, + "Global": { + "DefaultUILanguage": "en-us", + "HideTopLevelNodeFromPath": true, + "Path": "~/umbraco", + "TimeOutInMinutes": 20, + "UseHttps": false + }, + "Hosting": { + "Debug": false + }, + "KeepAlive": { + "DisableKeepAliveTask": false, + "KeepAlivePingUrl": "{umbracoApplicationUrl}/api/keepalive/ping" + }, + "RequestHandler": { + "ConvertUrlsToAscii": "try" + }, + "RuntimeMinification": { + "dataFolder": "App_Data\\Smidge", + "version": "1" + }, + "Security": { + "KeepUserLoggedIn": false, + "UsernameIsEmail": true, + "HideDisabledUsersInBackoffice": false, + "UserPassword": { + "RequiredLength": 10, + "RequireNonLetterOrDigit": false, + "RequireDigit": false, + "RequireLowercase": false, + "RequireUppercase": false, + "MaxFailedAccessAttemptsBeforeLockout": 5 + }, + "MemberPassword": { + "RequiredLength": 10, + "RequireNonLetterOrDigit": false, + "RequireDigit": false, + "RequireLowercase": false, + "RequireUppercase": false, + "MaxFailedAccessAttemptsBeforeLockout": 5 + } + }, + "Tours": { + "EnableTours": true + } + } + } +} \ No newline at end of file diff --git a/uSync8.Site/config/BackOfficeTours/getting-started.json b/uSync.Site/config/BackOfficeTours/getting-started.json similarity index 96% rename from uSync8.Site/config/BackOfficeTours/getting-started.json rename to uSync.Site/config/BackOfficeTours/getting-started.json index e300e656..7b3f2a21 100644 --- a/uSync8.Site/config/BackOfficeTours/getting-started.json +++ b/uSync.Site/config/BackOfficeTours/getting-started.json @@ -1,4 +1,22 @@ [ + { + "name": "Email Marketing", + "alias": "umbEmailMarketing", + "group": "Email Marketing", + "groupOrder": 10, + "hidden": true, + "requiredSections": [ + "content" + ], + "steps": [ + { + "title": "Do you want to stay updated on everything Umbraco?", + "content": "

Thank you for using Umbraco! Would you like to stay up-to-date with Umbraco product updates, security advisories, community news and special offers? Sign up for our newsletter and never miss out on the latest Umbraco news.

By signing up, you agree that we can use your info according to our privacy policy.

", + "view": "emails", + "type": "promotion" + } + ] + }, { "name": "Introduction", "alias": "umbIntroIntroduction", diff --git a/uSync8.Site/config/grid.editors.config.js b/uSync.Site/config/grid.editors.config.js similarity index 78% rename from uSync8.Site/config/grid.editors.config.js rename to uSync.Site/config/grid.editors.config.js index 12fa726f..210d167f 100644 --- a/uSync8.Site/config/grid.editors.config.js +++ b/uSync.Site/config/grid.editors.config.js @@ -7,12 +7,14 @@ }, { "name": "Image", + "nameTemplate": "{{ value && value.udi ? (value.udi | ncNodeName) : '' }}", "alias": "media", "view": "media", "icon": "icon-picture" }, { "name": "Macro", + "nameTemplate": "{{ value && value.macroAlias ? value.macroAlias : '' }}", "alias": "macro", "view": "macro", "icon": "icon-settings-alt" @@ -25,6 +27,7 @@ }, { "name": "Headline", + "nameTemplate": "{{ value }}", "alias": "headline", "view": "textstring", "icon": "icon-coin", @@ -35,6 +38,7 @@ }, { "name": "Quote", + "nameTemplate": "{{ value ? value.substring(0,32) + (value.length > 32 ? '...' : '') : '' }}", "alias": "quote", "view": "textstring", "icon": "icon-quote", @@ -43,4 +47,4 @@ "markup": "
#value#
" } } -] \ No newline at end of file +] diff --git a/uSync8.Site/config/Lang/cs-CZ.user.xml b/uSync.Site/config/lang/cs-CZ.user.xml similarity index 100% rename from uSync8.Site/config/Lang/cs-CZ.user.xml rename to uSync.Site/config/lang/cs-CZ.user.xml diff --git a/uSync8.Site/config/Lang/da-DK.user.xml b/uSync.Site/config/lang/da-DK.user.xml similarity index 100% rename from uSync8.Site/config/Lang/da-DK.user.xml rename to uSync.Site/config/lang/da-DK.user.xml diff --git a/uSync8.Site/config/Lang/de-DE.user.xml b/uSync.Site/config/lang/de-DE.user.xml similarity index 100% rename from uSync8.Site/config/Lang/de-DE.user.xml rename to uSync.Site/config/lang/de-DE.user.xml diff --git a/uSync8.Site/config/Lang/en-GB.user.xml b/uSync.Site/config/lang/en-GB.user.xml similarity index 100% rename from uSync8.Site/config/Lang/en-GB.user.xml rename to uSync.Site/config/lang/en-GB.user.xml diff --git a/uSync8.Site/config/Lang/en-US.user.xml b/uSync.Site/config/lang/en-US.user.xml similarity index 100% rename from uSync8.Site/config/Lang/en-US.user.xml rename to uSync.Site/config/lang/en-US.user.xml diff --git a/uSync8.Site/config/Lang/es-ES.user.xml b/uSync.Site/config/lang/es-ES.user.xml similarity index 100% rename from uSync8.Site/config/Lang/es-ES.user.xml rename to uSync.Site/config/lang/es-ES.user.xml diff --git a/uSync8.Site/config/Lang/fr-FR.user.xml b/uSync.Site/config/lang/fr-FR.user.xml similarity index 100% rename from uSync8.Site/config/Lang/fr-FR.user.xml rename to uSync.Site/config/lang/fr-FR.user.xml diff --git a/uSync8.Site/config/Lang/he-IL.user.xml b/uSync.Site/config/lang/he-IL.user.xml similarity index 100% rename from uSync8.Site/config/Lang/he-IL.user.xml rename to uSync.Site/config/lang/he-IL.user.xml diff --git a/uSync8.Site/config/Lang/it-IT.user.xml b/uSync.Site/config/lang/it-IT.user.xml similarity index 100% rename from uSync8.Site/config/Lang/it-IT.user.xml rename to uSync.Site/config/lang/it-IT.user.xml diff --git a/uSync8.Site/config/Lang/ja-JP.user.xml b/uSync.Site/config/lang/ja-JP.user.xml similarity index 100% rename from uSync8.Site/config/Lang/ja-JP.user.xml rename to uSync.Site/config/lang/ja-JP.user.xml diff --git a/uSync8.Site/config/Lang/ko-KR.user.xml b/uSync.Site/config/lang/ko-KR.user.xml similarity index 100% rename from uSync8.Site/config/Lang/ko-KR.user.xml rename to uSync.Site/config/lang/ko-KR.user.xml diff --git a/uSync8.Site/config/Lang/nb-NO.user.xml b/uSync.Site/config/lang/nb-NO.user.xml similarity index 100% rename from uSync8.Site/config/Lang/nb-NO.user.xml rename to uSync.Site/config/lang/nb-NO.user.xml diff --git a/uSync8.Site/config/Lang/nl-NL.user.xml b/uSync.Site/config/lang/nl-NL.user.xml similarity index 100% rename from uSync8.Site/config/Lang/nl-NL.user.xml rename to uSync.Site/config/lang/nl-NL.user.xml diff --git a/uSync8.Site/config/Lang/pl-PL.user.xml b/uSync.Site/config/lang/pl-PL.user.xml similarity index 100% rename from uSync8.Site/config/Lang/pl-PL.user.xml rename to uSync.Site/config/lang/pl-PL.user.xml diff --git a/uSync8.Site/config/Lang/pt-BR.user.xml b/uSync.Site/config/lang/pt-BR.user.xml similarity index 100% rename from uSync8.Site/config/Lang/pt-BR.user.xml rename to uSync.Site/config/lang/pt-BR.user.xml diff --git a/uSync8.Site/config/Lang/ru-RU.user.xml b/uSync.Site/config/lang/ru-RU.user.xml similarity index 100% rename from uSync8.Site/config/Lang/ru-RU.user.xml rename to uSync.Site/config/lang/ru-RU.user.xml diff --git a/uSync8.Site/config/Lang/sv-SE.user.xml b/uSync.Site/config/lang/sv-SE.user.xml similarity index 100% rename from uSync8.Site/config/Lang/sv-SE.user.xml rename to uSync.Site/config/lang/sv-SE.user.xml diff --git a/uSync8.Site/config/Lang/zh-CN.user.xml b/uSync.Site/config/lang/zh-CN.user.xml similarity index 100% rename from uSync8.Site/config/Lang/zh-CN.user.xml rename to uSync.Site/config/lang/zh-CN.user.xml diff --git a/uSync8.Site/config/logviewer.searches.config.js b/uSync.Site/config/logviewer.searches.config.js similarity index 91% rename from uSync8.Site/config/logviewer.searches.config.js rename to uSync.Site/config/logviewer.searches.config.js index 9dc93ee4..345fe237 100644 --- a/uSync8.Site/config/logviewer.searches.config.js +++ b/uSync.Site/config/logviewer.searches.config.js @@ -1,14 +1,10 @@ [ - { - "name": "All uSync Log Entries", - "query": "StartsWith(SourceContext, 'uSync8')" - }, { "name": "Find all logs where the Level is NOT Verbose and NOT Debug", "query": "Not(@Level='Verbose') and Not(@Level='Debug')" }, { - "name": "Find all logs that has an exception property (Warning, Error & Critical with Exceptions)", + "name": "Find all logs that has an exception property (Warning, Error & Fatal with Exceptions)", "query": "Has(@Exception)" }, { diff --git a/uSync.Site/config/serilog.Release.config b/uSync.Site/config/serilog.Release.config new file mode 100644 index 00000000..9aca408b --- /dev/null +++ b/uSync.Site/config/serilog.Release.config @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/uSync8.Site/config/serilog.config b/uSync.Site/config/serilog.config similarity index 85% rename from uSync8.Site/config/serilog.config rename to uSync.Site/config/serilog.config index e2f16069..1b357696 100644 --- a/uSync8.Site/config/serilog.config +++ b/uSync.Site/config/serilog.config @@ -7,7 +7,6 @@ - - + - - + + - + diff --git a/uSync.Site/config/serilog.user.Release.config b/uSync.Site/config/serilog.user.Release.config new file mode 100644 index 00000000..8f207406 --- /dev/null +++ b/uSync.Site/config/serilog.user.Release.config @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/uSync8.Site/config/serilog.user.config b/uSync.Site/config/serilog.user.config similarity index 85% rename from uSync8.Site/config/serilog.user.config rename to uSync.Site/config/serilog.user.config index 24e5e4e4..8f207406 100644 --- a/uSync8.Site/config/serilog.user.config +++ b/uSync.Site/config/serilog.user.config @@ -26,12 +26,13 @@ --> + diff --git a/uSync.Site/config/tinyMceConfig.Release.config b/uSync.Site/config/tinyMceConfig.Release.config new file mode 100644 index 00000000..f6a26ee8 --- /dev/null +++ b/uSync.Site/config/tinyMceConfig.Release.config @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + paste + anchor + charmap + table + lists + advlist + hr + autolink + directionality + tabfocus + searchreplace + + + + + font + + + + + raw + + diff --git a/uSync8.Site/config/tinyMceConfig.config b/uSync.Site/config/tinyMceConfig.config similarity index 97% rename from uSync8.Site/config/tinyMceConfig.config rename to uSync.Site/config/tinyMceConfig.config index a686021c..7f7cb657 100644 --- a/uSync8.Site/config/tinyMceConfig.config +++ b/uSync.Site/config/tinyMceConfig.config @@ -1,4 +1,4 @@ - + @@ -8,7 +8,7 @@ - + diff --git a/uSync.Site/config/uSync8.config b/uSync.Site/config/uSync8.config new file mode 100644 index 00000000..0ddba5a2 --- /dev/null +++ b/uSync.Site/config/uSync8.config @@ -0,0 +1,46 @@ + + + + ~/uSync/v8/ + True + False + False + True + False + False + + + False + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/uSync.Site/uSync.Site.csproj b/uSync.Site/uSync.Site.csproj new file mode 100644 index 00000000..1dc8b8c2 --- /dev/null +++ b/uSync.Site/uSync.Site.csproj @@ -0,0 +1,68 @@ + + + + netcoreapp3.1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/uSync.Site/uSync/v9/Content/about-this-starter-kit.config b/uSync.Site/uSync/v9/Content/about-this-starter-kit.config new file mode 100644 index 00000000..12db383e --- /dev/null +++ b/uSync.Site/uSync/v9/Content/about-this-starter-kit.config @@ -0,0 +1,41 @@ + + + + About Us + /Home/AboutUs/AboutThisStarterKit + false + contentPage + 2020-08-26T10:43:40 + + 0 + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/Content/about-us.config b/uSync.Site/uSync/v9/Content/about-us.config new file mode 100644 index 00000000..8ea56812 --- /dev/null +++ b/uSync.Site/uSync/v9/Content/about-us.config @@ -0,0 +1,117 @@ + + + + Home + /Home/AboutUs + false + contentPage + 2020-08-26T10:43:40 + + 2 + + + + + + + Vestibulum ac diam sit amet quam vehicula elementum sed sit amet dui. Curabitur aliquet quam id dui posuere blandit. Vivamus suscipit tortor eget felis porttitor volutpat. Proin eget tortor risus. Sed porttitor lectus nibh. Cras ultricies ligula sed magna dictum porta. Pellentesque in ipsum id orci porta dapibus. Pellentesque in ipsum id orci porta dapibus. Nulla porttitor accumsan tincidunt. Mauris blandit aliquet elit, eget tincidunt nibh pulvinar a.

\n

Vestibulum ac diam sit amet quam vehicula elementum sed sit amet dui. Curabitur aliquet quam id dui posuere blandit. Vivamus suscipit tortor eget felis porttitor volutpat. Proin eget tortor risus. Sed porttitor lectus nibh. Cras ultricies ligula sed magna dictum porta. Pellentesque in ipsum id orci porta dapibus. Pellentesque in ipsum id orci porta dapibus. Nulla porttitor accumsan tincidunt. Mauris blandit aliquet elit, eget tincidunt nibh pulvinar a.

", + "editor": { + "alias": "rte", + "view": "rte" + }, + "styles": null, + "config": null + }, + { + "value": "", + "editor": { + "alias": "embed", + "view": "embed" + }, + "styles": null, + "config": null + } + ], + "styles": null, + "config": null + } + ], + "styles": null, + "config": null + } + ] + } + ] +}]]>
+
+ + + + + + + + + + + + +
+
\ No newline at end of file diff --git a/uSync.Site/uSync/v9/Content/another-one.config b/uSync.Site/uSync/v9/Content/another-one.config new file mode 100644 index 00000000..65638e4e --- /dev/null +++ b/uSync.Site/uSync/v9/Content/another-one.config @@ -0,0 +1,90 @@ + + + + Blog + /Home/Blog/AnotherOne + false + blogpost + 2020-08-26T10:43:40 + + 1 + + + + + + + Donec sollicitudin molestie malesuada. Proin eget tortor risus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus magna justo, lacinia eget consectetur sed, convallis at tellus. Vivamus magna justo, lacinia eget consectetur sed, convallis at tellus. Curabitur arcu erat, accumsan id imperdiet et, porttitor at sem. Nulla porttitor accumsan tincidunt. Vivamus magna justo, lacinia eget consectetur sed, convallis at tellus. Nulla porttitor accumsan tincidunt. Donec rutrum congue leo eget malesuada.

\n

Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Donec velit neque, auctor sit amet aliquam vel, ullamcorper sit amet ligula. Pellentesque in ipsum id orci porta dapibus. Donec rutrum congue leo eget malesuada. Nulla porttitor accumsan tincidunt. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Donec velit neque, auctor sit amet aliquam vel, ullamcorper sit amet ligula. Curabitur non nulla sit amet nisl tempus convallis quis ac lectus. Proin eget tortor risus. Pellentesque in ipsum id orci porta dapibus. Proin eget tortor risus. Sed porttitor lectus nibh.

\n

Pellentesque in ipsum id orci porta dapibus. Curabitur aliquet quam id dui posuere blandit. Praesent sapien massa, convallis a pellentesque nec, egestas non nisi. Praesent sapien massa, convallis a pellentesque nec, egestas non nisi. Curabitur non nulla sit amet nisl tempus convallis quis ac lectus. Praesent sapien massa, convallis a pellentesque nec, egestas non nisi. Donec rutrum congue leo eget malesuada. Donec rutrum congue leo eget malesuada. Sed porttitor lectus nibh. Nulla quis lorem ut libero malesuada feugiat.

", + "editor": { + "alias": "rte", + "view": null + }, + "styles": null, + "config": null + } + ], + "styles": null, + "config": null + } + ], + "styles": null, + "config": null + } + ] + } + ] +}]]>
+
+ + + + + + + + + + + + + + + + + + +
+
\ No newline at end of file diff --git a/uSync.Site/uSync/v9/Content/banjo.config b/uSync.Site/uSync/v9/Content/banjo.config new file mode 100644 index 00000000..9e936b67 --- /dev/null +++ b/uSync.Site/uSync/v9/Content/banjo.config @@ -0,0 +1,50 @@ + + + + Products + /Home/Products/Banjo + false + product + 2020-08-26T10:43:40 + + 5 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/Content/biker-jacket.config b/uSync.Site/uSync/v9/Content/biker-jacket.config new file mode 100644 index 00000000..5425980c --- /dev/null +++ b/uSync.Site/uSync/v9/Content/biker-jacket.config @@ -0,0 +1,72 @@ + + + + Products + /Home/Products/BikerJacket + false + product + 2020-08-26T10:43:40 + + 7 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/Content/blog.config b/uSync.Site/uSync/v9/Content/blog.config new file mode 100644 index 00000000..9e7db318 --- /dev/null +++ b/uSync.Site/uSync/v9/Content/blog.config @@ -0,0 +1,47 @@ + + + + Home + /Home/Blog + false + blog + 2020-08-26T10:43:40 + + 3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/Content/bowling-ball.config b/uSync.Site/uSync/v9/Content/bowling-ball.config new file mode 100644 index 00000000..0de03f25 --- /dev/null +++ b/uSync.Site/uSync/v9/Content/bowling-ball.config @@ -0,0 +1,50 @@ + + + + Products + /Home/Products/BowlingBall + false + product + 2020-08-26T10:43:40 + + 3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/Content/contact.config b/uSync.Site/uSync/v9/Content/contact.config new file mode 100644 index 00000000..48bc4dc7 --- /dev/null +++ b/uSync.Site/uSync/v9/Content/contact.config @@ -0,0 +1,44 @@ + + + + Home + /Home/Contact + false + contact + 2020-08-26T10:43:40 + + 4 + + + + + + + + + + + + + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam eget lacinia nisl. Aenean sollicitudin diam vitae enim ultrices, semper euismod magna efficitur.

]]>
+
+ + + + + + + + + + + + + + + + + + +
+
\ No newline at end of file diff --git a/uSync.Site/uSync/v9/Content/home.config b/uSync.Site/uSync/v9/Content/home.config new file mode 100644 index 00000000..d387128a --- /dev/null +++ b/uSync.Site/uSync/v9/Content/home.config @@ -0,0 +1,109 @@ + + + + + /Home + false + home + 2020-08-26T10:43:40 + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/Content/homepage.config b/uSync.Site/uSync/v9/Content/homepage.config new file mode 100644 index 00000000..dac20d46 --- /dev/null +++ b/uSync.Site/uSync/v9/Content/homepage.config @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/Content/jan-skovgaard.config b/uSync.Site/uSync/v9/Content/jan-skovgaard.config new file mode 100644 index 00000000..5956bd9a --- /dev/null +++ b/uSync.Site/uSync/v9/Content/jan-skovgaard.config @@ -0,0 +1,47 @@ + + + + People + /Home/People/JanSkovgaard + false + person + 2020-08-26T10:43:40 + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/Content/jeavon-leopold.config b/uSync.Site/uSync/v9/Content/jeavon-leopold.config new file mode 100644 index 00000000..e02367e6 --- /dev/null +++ b/uSync.Site/uSync/v9/Content/jeavon-leopold.config @@ -0,0 +1,47 @@ + + + + People + /Home/People/JeavonLeopold + false + person + 2020-08-26T10:43:40 + + 3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/Content/jeroen-breuer.config b/uSync.Site/uSync/v9/Content/jeroen-breuer.config new file mode 100644 index 00000000..51f1434e --- /dev/null +++ b/uSync.Site/uSync/v9/Content/jeroen-breuer.config @@ -0,0 +1,47 @@ + + + + People + /Home/People/JeroenBreuer + false + person + 2020-08-26T10:43:40 + + 4 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/Content/jumpsuit.config b/uSync.Site/uSync/v9/Content/jumpsuit.config new file mode 100644 index 00000000..7ba6642d --- /dev/null +++ b/uSync.Site/uSync/v9/Content/jumpsuit.config @@ -0,0 +1,50 @@ + + + + Products + /Home/Products/Jumpsuit + false + product + 2020-08-26T10:43:40 + + 4 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/Content/knitted-west.config b/uSync.Site/uSync/v9/Content/knitted-west.config new file mode 100644 index 00000000..5065a64d --- /dev/null +++ b/uSync.Site/uSync/v9/Content/knitted-west.config @@ -0,0 +1,50 @@ + + + + Products + /Home/Products/KnittedWest + false + product + 2020-08-26T10:43:40 + + 6 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/Content/kontakt.config b/uSync.Site/uSync/v9/Content/kontakt.config new file mode 100644 index 00000000..b6f448b0 --- /dev/null +++ b/uSync.Site/uSync/v9/Content/kontakt.config @@ -0,0 +1,44 @@ + + + + Home (1) + /Home1/Kontakt + false + contact + 2020-08-27T12:13:16 + + 4 + + + + + + + + + + + + + Lorem ipsum dolor sitzen amet, consectetur adipiscing elit. Nullam eget lacinia nisl. Aenean sollicitudin diam vitae enim ultrices, sempre euismod magna efficitur.

]]>
+
+ + + + + + + + + + + + + + + + + + +
+
\ No newline at end of file diff --git a/uSync.Site/uSync/v9/Content/lee-kelleher.config b/uSync.Site/uSync/v9/Content/lee-kelleher.config new file mode 100644 index 00000000..20ae86b6 --- /dev/null +++ b/uSync.Site/uSync/v9/Content/lee-kelleher.config @@ -0,0 +1,47 @@ + + + + People + /Home/People/LeeKelleher + false + person + 2020-08-26T10:43:40 + + 2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/Content/matt-brailsford.config b/uSync.Site/uSync/v9/Content/matt-brailsford.config new file mode 100644 index 00000000..161f38b5 --- /dev/null +++ b/uSync.Site/uSync/v9/Content/matt-brailsford.config @@ -0,0 +1,47 @@ + + + + People + /Home/People/MattBrailsford + false + person + 2020-08-26T10:43:40 + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/Content/my-blog-post.config b/uSync.Site/uSync/v9/Content/my-blog-post.config new file mode 100644 index 00000000..c8d9501e --- /dev/null +++ b/uSync.Site/uSync/v9/Content/my-blog-post.config @@ -0,0 +1,73 @@ + + + + Blog + /Home/Blog/MyBlogPost + false + blogpost + 2020-08-26T10:43:40 + + 0 + + + + + + + Curabitur arcu erat, accumsan id imperdiet et, porttitor at sem. Donec sollicitudin molestie malesuada. Vivamus suscipit tortor eget felis porttitor volutpat. Sed porttitor lectus nibh. Vivamus magna justo, lacinia eget consectetur sed, convallis at tellus. Donec sollicitudin molestie malesuada.

\n

Curabitur arcu erat, accumsan id imperdiet et, porttitor at sem. Donec sollicitudin molestie malesuada. Vivamus suscipit tortor eget felis porttitor volutpat. Sed porttitor lectus nibh. Vivamus magna justo, lacinia eget consectetur sed, convallis at tellus. Donec sollicitudin molestie malesuada.

\n

Curabitur arcu erat, accumsan id imperdiet et, porttitor at sem. Donec sollicitudin molestie malesuada. Vivamus suscipit tortor eget felis porttitor volutpat. Sed porttitor lectus nibh. Vivamus magna justo, lacinia eget consectetur sed, convallis at tellus. Donec sollicitudin molestie malesuada.

", + "editor": { + "alias": "rte" + }, + "active": true + } + ], + "active": true + } + ], + "hasConfig": false, + "id": "1f96a69f-0cb9-4a00-6a76-f8cec30befec", + "hasActiveChild": true, + "active": true + } + ] + } + ] +}]]>
+
+ + + + + + + + + + + + + + + + + + +
+
\ No newline at end of file diff --git a/uSync.Site/uSync/v9/Content/people.config b/uSync.Site/uSync/v9/Content/people.config new file mode 100644 index 00000000..2d332771 --- /dev/null +++ b/uSync.Site/uSync/v9/Content/people.config @@ -0,0 +1,44 @@ + + + + Home + /Home/People + false + people + 2020-08-26T10:43:40 + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/Content/ping-pong-ball.config b/uSync.Site/uSync/v9/Content/ping-pong-ball.config new file mode 100644 index 00000000..fbf64b69 --- /dev/null +++ b/uSync.Site/uSync/v9/Content/ping-pong-ball.config @@ -0,0 +1,50 @@ + + + + Products + /Home/Products/PingPongBall + false + product + 2020-08-26T10:43:40 + + 2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/Content/products.config b/uSync.Site/uSync/v9/Content/products.config new file mode 100644 index 00000000..ec4bf792 --- /dev/null +++ b/uSync.Site/uSync/v9/Content/products.config @@ -0,0 +1,47 @@ + + + + Home + /Home/Products + false + products + 2020-08-26T10:43:40 + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/Content/tattoo.config b/uSync.Site/uSync/v9/Content/tattoo.config new file mode 100644 index 00000000..7089cdb9 --- /dev/null +++ b/uSync.Site/uSync/v9/Content/tattoo.config @@ -0,0 +1,50 @@ + + + + Products + /Home/Products/Tattoo + false + product + 2020-08-26T10:43:40 + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/Content/this-will-be-great.config b/uSync.Site/uSync/v9/Content/this-will-be-great.config new file mode 100644 index 00000000..d39f7111 --- /dev/null +++ b/uSync.Site/uSync/v9/Content/this-will-be-great.config @@ -0,0 +1,88 @@ + + + + Blog + /Home/Blog/ThisWillBeGreat + false + blogpost + 2020-08-26T10:43:40 + + 2 + + + + + + + Vivamus suscipit tortor eget felis porttitor volutpat. Curabitur arcu erat, accumsan id imperdiet et, porttitor at sem. Quisque velit nisi, pretium ut lacinia in, elementum id enim. Vivamus magna justo, lacinia eget consectetur sed, convallis at tellus. Proin eget tortor risus. Curabitur arcu erat, accumsan id imperdiet et, porttitor at sem. Vivamus magna justo, lacinia eget consectetur sed, convallis at tellus. Curabitur non nulla sit amet nisl tempus convallis quis ac lectus. Donec rutrum congue leo eget malesuada. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Donec velit neque, auctor sit amet aliquam vel, ullamcorper sit amet ligula.

", + "editor": { + "alias": "rte" + }, + "active": false + }, + { + "value": "", + "editor": { + "alias": "embed" + }, + "active": false + }, + { + "value": "

 

\n

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec sollicitudin molestie malesuada. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus magna justo, lacinia eget consectetur sed, convallis at tellus. Mauris blandit aliquet elit, eget tincidunt nibh pulvinar a. Cras ultricies ligula sed magna dictum porta. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras ultricies ligula sed magna dictum porta. Pellentesque in ipsum id orci porta dapibus.

\n

Vivamus magna justo, lacinia eget consectetur sed, convallis at tellus. Vivamus magna justo, lacinia eget consectetur sed, convallis at tellus. Nulla quis lorem ut libero malesuada feugiat. Curabitur non nulla sit amet nisl tempus convallis quis ac lectus. Sed porttitor lectus nibh. Vivamus suscipit tortor eget felis porttitor volutpat. Nulla porttitor accumsan tincidunt. Praesent sapien massa, convallis a pellentesque nec, egestas non nisi. Curabitur non nulla sit amet nisl tempus convallis quis ac lectus. Nulla porttitor accumsan tincidunt.

\n

Vestibulum ac diam sit amet quam vehicula elementum sed sit amet dui. Vivamus suscipit tortor eget felis porttitor volutpat. Sed porttitor lectus nibh. Curabitur non nulla sit amet nisl tempus convallis quis ac lectus. Quisque velit nisi, pretium ut lacinia in, elementum id enim. Donec rutrum congue leo eget malesuada. Nulla porttitor accumsan tincidunt. Nulla quis lorem ut libero malesuada feugiat. Quisque velit nisi, pretium ut lacinia in, elementum id enim. Donec sollicitudin molestie malesuada.

\n

Proin eget tortor risus. Donec rutrum congue leo eget malesuada. Pellentesque in ipsum id orci porta dapibus. Donec rutrum congue leo eget malesuada. Nulla quis lorem ut libero malesuada feugiat. Curabitur arcu erat, accumsan id imperdiet et, porttitor at sem. Praesent sapien massa, convallis a pellentesque nec, egestas non nisi. Praesent sapien massa, convallis a pellentesque nec, egestas non nisi. Donec sollicitudin molestie malesuada. Vivamus suscipit tortor eget felis porttitor volutpat.

", + "editor": { + "alias": "rte" + }, + "active": true + } + ], + "active": true, + "hasActiveChild": true + } + ], + "hasConfig": false, + "id": "4820aba2-8d6b-4a7e-7f57-e0490a9b475e", + "hasActiveChild": true, + "active": true + } + ] + } + ] +}]]>
+
+ + + + + + + + + + + + + + + + + + +
+
\ No newline at end of file diff --git a/uSync.Site/uSync/v9/Content/todo-list-for-the-starter-kit.config b/uSync.Site/uSync/v9/Content/todo-list-for-the-starter-kit.config new file mode 100644 index 00000000..281fb249 --- /dev/null +++ b/uSync.Site/uSync/v9/Content/todo-list-for-the-starter-kit.config @@ -0,0 +1,68 @@ + + + + About Us + /Home/AboutUs/TodoListForTheStarterKit + false + contentPage + 2020-08-26T10:43:40 + + 1 + + + + + + + Here's what could be improved in the Starter Kit so far:

\n

 

\n

For v1:

\n
    \n
  • Use a custom grid editor for testimonials
  • \n
  • Integrated Analytics on pages
  • \n
  • Call To Action Button in the grid (with \"Tag Manager\" integration)
  • \n
  • Macro for fetching products (with friendly grid preview)
  • \n
  • Design Review (polish)
  • \n
  • Verify licenses of photos (Niels)
  • \n
\n

For vNext

\n
    \n
  • Swap text with uploaded logo
  • \n
  • Nicer pickers of products and employees
  • \n
  • Custom Listview for products and employees
  • \n
  • Discus template on blog posts
  • \n
  • 404 template
  • \n
  • Member Login/Register/Profile/Forgot password
  • \n
  • Update default styling of grid header
  • \n
  • On a Blog post -> Share/Social (tweet this / facebook this)
  • \n
", + "editor": { + "alias": "rte" + }, + "active": true + } + ], + "active": true, + "hasActiveChild": true + } + ], + "hasConfig": false, + "id": "5ea1e364-8406-e5e6-a82c-45985fd6054e", + "hasActiveChild": true, + "active": true + } + ] + } + ] +}]]>
+
+ + + + + + + + + + + + +
+
\ No newline at end of file diff --git a/uSync.Site/uSync/v9/Content/unicorn.config b/uSync.Site/uSync/v9/Content/unicorn.config new file mode 100644 index 00000000..956e4485 --- /dev/null +++ b/uSync.Site/uSync/v9/Content/unicorn.config @@ -0,0 +1,50 @@ + + + + Products + /Home/Products/Unicorn + false + product + 2020-08-26T10:43:40 + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/ContentTypes/blog.config b/uSync.Site/uSync/v9/ContentTypes/blog.config new file mode 100644 index 00000000..3db55026 --- /dev/null +++ b/uSync.Site/uSync/v9/ContentTypes/blog.config @@ -0,0 +1,62 @@ + + + + Blog + icon-calendar-alt color-black + folder.png + + False + True + Nothing + false + + contentBase + navigationBase + + Blog + + + + + + blogpost + + + + 8fca7db5-faa0-46c4-9a35-4fa0ad186dbf + Disqus Shortname + disqusShortname + 0cc0eba1-9960-42c9-bf9b-60e150b429ae + Umbraco.TextBox + false + + + 1 + Settings + + + Nothing + + + d6b70fa2-0308-4347-956b-fa7b8b658861 + How many posts should be shown? + howManyPostsShouldBeShown + 9d5ba2c5-ed7a-41f8-b454-9fc65f48752e + Umbraco.Slider + true + + + 0 + Settings + + + Nothing + + + + + Settings + 0 + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/ContentTypes/blogpost.config b/uSync.Site/uSync/v9/ContentTypes/blogpost.config new file mode 100644 index 00000000..fdcc27f9 --- /dev/null +++ b/uSync.Site/uSync/v9/ContentTypes/blogpost.config @@ -0,0 +1,89 @@ + + + + Blogpost + icon-calendar color-black + folder.png + + False + False + Nothing + false + + navigationBase + + Blogpost + + + + + + + + 0abd7f8c-3efb-4e2f-8b76-105a5c6bf518 + Content + bodyText + ea0ed4c1-c489-43b8-9058-a70babf430ff + Umbraco.Grid + false + + + 3 + Content + + + Nothing + + + 885f10d8-10b1-4fd3-840b-adb47db45993 + Categories (tags) + categories + 30c35221-91b0-49a5-a599-42d1965161ea + Umbraco.Tags + false + + + 1 + Content + + + Nothing + + + 550c6315-175f-4efb-84e9-ce4e31f92172 + Excerpt + excerpt + c6bac0dd-4ab9-45b1-8e30-e4b619ee5da3 + Umbraco.TextArea + true + + + 2 + Content + + + Nothing + + + 32caa1aa-d15e-460a-8afc-f0492a285d0f + Page Title + pageTitle + 0cc0eba1-9960-42c9-bf9b-60e150b429ae + Umbraco.TextBox + true + + + 0 + Content + + + Nothing + + + + + Content + 0 + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/ContentTypes/contact.config b/uSync.Site/uSync/v9/ContentTypes/contact.config new file mode 100644 index 00000000..2d19a028 --- /dev/null +++ b/uSync.Site/uSync/v9/ContentTypes/contact.config @@ -0,0 +1,123 @@ + + + + Contact + icon-map-location color-black + folder.png + + False + False + Nothing + false + + navigationBase + + contact + + + + + + + + 966a785e-4a30-4d83-bcad-0600ee66b7d3 + Pick a Contact Form + contactForm + f0bc4bfb-b499-40d6-ba86-058885a5178c + Umbraco.Label + false + + + 3 + Form + + + Nothing + + + 168f110b-47a9-4c0e-8728-d749e27344b1 + Contact Form Header + contactFormHeader + 0cc0eba1-9960-42c9-bf9b-60e150b429ae + Umbraco.TextBox + true + + + 1 + Form + + + Nothing + + + bf5fdba9-1ce0-42ca-8abd-0310addcd844 + Contact Intro + contactIntro + ecbbac0d-974e-490c-b533-fead926dc525 + Umbraco.TinyMCE + true + + + 2 + Form + + + Nothing + + + 13ef26b7-1c9e-4f2d-bc3b-756f9d70d35e + Map Coordinates + mapCoordinates + fc1475d2-7c7b-4b2f-bc53-54c86fd43d6c + Our.Umbraco.OsmMaps + false + + + 1 + Map + + + Nothing + + + 49e1336e-75a1-496a-8451-b6dd74e67e2a + Map Header + mapHeader + 0cc0eba1-9960-42c9-bf9b-60e150b429ae + Umbraco.TextBox + false + + + 0 + Map + + + Nothing + + + 28dd19bb-ab40-4684-9cb2-20a9ea1be3b2 + Page Title + pageTitle + 0cc0eba1-9960-42c9-bf9b-60e150b429ae + Umbraco.TextBox + true + + + 0 + Form + + + Nothing + + + + + Form + 0 + + + Map + 1 + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/ContentTypes/contentbase.config b/uSync.Site/uSync/v9/ContentTypes/contentbase.config new file mode 100644 index 00000000..0285628d --- /dev/null +++ b/uSync.Site/uSync/v9/ContentTypes/contentbase.config @@ -0,0 +1,56 @@ + + + + Content Base + icon-document + folder.png + + False + False + Nothing + false + Compositions + + + + + + + + e7977da9-0a3f-49bd-9c11-3cb5ac124bde + Content + bodyText + ea0ed4c1-c489-43b8-9058-a70babf430ff + Umbraco.Grid + false + + + 1 + Content + + + Nothing + + + 45407ece-b012-4406-a855-ed46a2b1cc96 + Page Title + pageTitle + 0cc0eba1-9960-42c9-bf9b-60e150b429ae + Umbraco.TextBox + true + + + 0 + Content + + + Nothing + + + + + Content + 0 + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/ContentTypes/contentpage.config b/uSync.Site/uSync/v9/ContentTypes/contentpage.config new file mode 100644 index 00000000..95be7fe3 --- /dev/null +++ b/uSync.Site/uSync/v9/ContentTypes/contentpage.config @@ -0,0 +1,26 @@ + + + + Content Page + icon-document + folder.png + + False + False + Nothing + false + + contentBase + navigationBase + + contentPage + + + + + + contentPage + + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/ContentTypes/feature.config b/uSync.Site/uSync/v9/ContentTypes/feature.config new file mode 100644 index 00000000..7999b596 --- /dev/null +++ b/uSync.Site/uSync/v9/ContentTypes/feature.config @@ -0,0 +1,56 @@ + + + + Feature + icon-plugin color-black + folder.png + + False + False + Nothing + true + Compositions + + + + + + + + 77e58a15-1f2d-432e-9a4d-d20a68265a8e + Details + featureDetails + c6bac0dd-4ab9-45b1-8e30-e4b619ee5da3 + Umbraco.TextArea + false + + + 1 + Feature + + + Nothing + + + 43f908ff-db3f-4af1-a342-ac4ae6556eb5 + Name + featureName + 0cc0eba1-9960-42c9-bf9b-60e150b429ae + Umbraco.TextBox + true + + + 0 + Feature + + + Nothing + + + + + Feature + 0 + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/ContentTypes/home.config b/uSync.Site/uSync/v9/ContentTypes/home.config new file mode 100644 index 00000000..3486b773 --- /dev/null +++ b/uSync.Site/uSync/v9/ContentTypes/home.config @@ -0,0 +1,270 @@ + + + + Home + icon-home color-black + folder.png + + True + False + Nothing + false + + home + + + + + + blog + contact + contentPage + people + products + + + + a75e3ae8-0182-457a-a2cb-eda14f3e6229 + Content + bodyText + 34a7f8f5-a84e-439b-9322-466ff7ed8866 + Umbraco.Grid + false + + + 0 + Content + + + Nothing + + + 96cd3a60-b922-410e-a01f-d76a8815241b + Color Theme + colorTheme + 71548df5-836c-41f8-96ac-5b98fe5e2e19 + Umbraco.RadioButtonList + true + + + 2 + Design + + + Nothing + + + 413b56a5-ba92-487a-85c3-233fe6aac702 + Font + font + fff3c360-3f90-45b3-a554-e29ca72cdce4 + Umbraco.RadioButtonList + true + + + 1 + Design + + + Nothing + + + 7a87e1a7-f605-4155-b227-1c6b85fbe2c2 + Address + footerAddress + 0cc0eba1-9960-42c9-bf9b-60e150b429ae + Umbraco.TextBox + true + + + 4 + Footer + + + Nothing + + + 0c26996d-3304-4c5c-811a-5dae10cd044d + Call To Action Caption + footerCTACaption + 0cc0eba1-9960-42c9-bf9b-60e150b429ae + Umbraco.TextBox + false + + + 2 + Footer + + + Nothing + + + 0f91aa05-eb35-41e7-9e1e-01caffc63036 + Call To Action Link + FooterCtalink + 3ece86aa-61ad-45d5-b1dd-8f02f25df949 + Umbraco.ContentPicker + true + + + 3 + Footer + + + Nothing + + + 72dd1609-1123-494a-84c3-e7d79a708422 + Description + footerDescription + c6bac0dd-4ab9-45b1-8e30-e4b619ee5da3 + Umbraco.TextArea + false + + + 1 + Footer + + + Nothing + + + bcc7b27e-1208-48a8-8e8c-3d24d296b4b3 + Header + footerHeader + 0cc0eba1-9960-42c9-bf9b-60e150b429ae + Umbraco.TextBox + false + + + 0 + Footer + + + Nothing + + + 9181c18a-64ae-4236-bd33-eff4c7b1a0e8 + Hero Background + HeroBackgroundImage + 135d60e0-64d9-49ed-ab08-893c9ba44ae5 + Umbraco.MediaPicker + true + + + 0 + Design + + + Nothing + + + a155abc3-09ea-4028-a0b2-3c5cffc2bf05 + Call To Action Caption + heroCTACaption + 0cc0eba1-9960-42c9-bf9b-60e150b429ae + Umbraco.TextBox + true + + + 2 + Hero + + + Nothing + + + 1d9b0434-c315-4a88-abfc-b8c12a95aaf1 + Call To Action Link + HeroCtalink + 3ece86aa-61ad-45d5-b1dd-8f02f25df949 + Umbraco.ContentPicker + true + + + 3 + Hero + + + Nothing + + + 3a2e6ee1-20a8-43ae-bbe0-5a3ffed44f88 + Description + heroDescription + c6bac0dd-4ab9-45b1-8e30-e4b619ee5da3 + Umbraco.TextArea + true + + + 1 + Hero + + + Nothing + + + d1d76ab2-3f4d-45b4-9b70-e87fb70f1ce2 + Header + heroHeader + 0cc0eba1-9960-42c9-bf9b-60e150b429ae + Umbraco.TextBox + true + + + 0 + Hero + + + Nothing + + + a06cae57-8210-4834-a068-311fab674877 + Logo + SiteLogo + 135d60e0-64d9-49ed-ab08-893c9ba44ae5 + Umbraco.MediaPicker + false + + + 4 + Design + + + Nothing + + + 21254a4d-5097-4195-92c7-28fcab45d000 + Sitename + sitename + 0cc0eba1-9960-42c9-bf9b-60e150b429ae + Umbraco.TextBox + true + + + 3 + Design + + + Nothing + + + + + Hero + 0 + + + Content + 1 + + + Footer + 2 + + + Design + 3 + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/ContentTypes/navigationbase.config b/uSync.Site/uSync/v9/ContentTypes/navigationbase.config new file mode 100644 index 00000000..d089d02a --- /dev/null +++ b/uSync.Site/uSync/v9/ContentTypes/navigationbase.config @@ -0,0 +1,71 @@ + + + + Navigation Base + icon-nodes color-black + folder.png + + False + False + Nothing + false + Compositions + + + + + + + + 8debf78c-842c-42f1-9093-ec7ce90478b3 + Keywords + keywords + 30c35221-91b0-49a5-a599-42d1965161ea + Umbraco.Tags + false + + + 1 + Navigation & SEO + + + Nothing + + + 87052b85-fa4b-44d5-a044-f3bbf79ee391 + Description + seoMetaDescription + c6bac0dd-4ab9-45b1-8e30-e4b619ee5da3 + Umbraco.TextArea + false + + + 0 + Navigation & SEO + + + Nothing + + + 898fdec9-b700-4137-a7bf-19cdef9048d4 + Hide in Navigation + umbracoNavihide + 92897bc6-a5f3-4ffe-ae27-f2e7e33dda49 + Umbraco.TrueFalse + false + + + 2 + Navigation & SEO + + + Nothing + + + + + Navigation & SEO + 10 + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/ContentTypes/people.config b/uSync.Site/uSync/v9/ContentTypes/people.config new file mode 100644 index 00000000..6dc3e6f7 --- /dev/null +++ b/uSync.Site/uSync/v9/ContentTypes/people.config @@ -0,0 +1,47 @@ + + + + People + icon-user-females-alt color-black + folder.png + + False + True + Nothing + false + + contentBase + navigationBase + + people + + + + + + person + + + + 6866c730-10e3-41ce-baab-509e571fa7be + Featured People + featuredPeople + 4885450e-a60f-42bb-984a-43988baf5283 + Umbraco.MultiNodeTreePicker + false + + + 2 + Content + + + Nothing + + + + + Content + 0 + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/ContentTypes/person.config b/uSync.Site/uSync/v9/ContentTypes/person.config new file mode 100644 index 00000000..553a060c --- /dev/null +++ b/uSync.Site/uSync/v9/ContentTypes/person.config @@ -0,0 +1,138 @@ + + + + Person + icon-user-female color-black + folder.png + + False + False + Nothing + false + + navigationBase + + Person + + + + + + + + dc5014f9-866b-4e84-8a0d-4a816f69c831 + Department + department + b58c1530-91c9-4c83-aa35-032aca0f7b89 + Umbraco.Tags + false + + + 1 + Details + + + Nothing + + + cd6fd6b1-356c-43ae-9e8f-5264796f28dc + Email + email + 0cc0eba1-9960-42c9-bf9b-60e150b429ae + Umbraco.TextBox + false + + + 2 + Details + + + Nothing + + + 6dd013b1-0a1e-4c01-bb5e-d680554b1048 + Facebook username + facebookUsername + 0cc0eba1-9960-42c9-bf9b-60e150b429ae + Umbraco.TextBox + false + + + 1 + Social + + + Nothing + + + 1ce5b2cd-c114-4ac9-a152-7a23c154021b + Instagram Username + instagramUsername + 0cc0eba1-9960-42c9-bf9b-60e150b429ae + Umbraco.TextBox + false + + + 3 + Social + + + Nothing + + + 39bebec6-9797-4a13-9e9a-3ae9c67cb2e2 + LinkedIn username + linkedInUsername + 0cc0eba1-9960-42c9-bf9b-60e150b429ae + Umbraco.TextBox + false + + + 2 + Social + + + Nothing + + + 562efb51-ea18-4e34-bc03-3c35f0767946 + Photo + photo + e26a8d91-a9d7-475b-bc3b-2a09f4743754 + Umbraco.MediaPicker + false + + + 0 + Details + + + Nothing + + + 528007c6-2f89-4992-bd76-3fd5ef81da82 + Twitter username + twitterUsername + 0cc0eba1-9960-42c9-bf9b-60e150b429ae + Umbraco.TextBox + false + + + 0 + Social + + + Nothing + + + + + Details + 0 + + + Social + 0 + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/ContentTypes/product.config b/uSync.Site/uSync/v9/ContentTypes/product.config new file mode 100644 index 00000000..764f73a7 --- /dev/null +++ b/uSync.Site/uSync/v9/ContentTypes/product.config @@ -0,0 +1,155 @@ + + + + Product + icon-sweatshirt color-black + folder.png + + False + False + Nothing + false + + Product + + + + + + + + b3cb1e4d-7eeb-4f84-b490-189143e1bd58 + Content + bodyText + ea0ed4c1-c489-43b8-9058-a70babf430ff + Umbraco.Grid + false + + + 0 + Detailed Description + + + Nothing + + + 72158f64-50ad-47e7-8199-81d64df6de6f + Category + category + 59ac0a33-9d34-4236-9886-99310d13d7f1 + Umbraco.Tags + true + + + 2 + Product Details + + + Nothing + + + debf1117-dd5f-4fa3-8874-6416173cae38 + Description + description + c6bac0dd-4ab9-45b1-8e30-e4b619ee5da3 + Umbraco.TextArea + true + + + 3 + Product Details + + + Nothing + + + d18ac8c6-9168-4c58-81f9-a4a641be1032 + Features + features + 84bbeb67-df7e-4043-8db8-55df52d01456 + Umbraco.NestedContent + false + + + 0 + Features + + + Nothing + + + 9cff4d62-508e-43af-a82e-43dd375ed619 + Photos + photos + 3ada047c-6dfc-4a14-afc4-7efb79390f92 + Umbraco.MediaPicker + true + + + 5 + Product Details + + + Nothing + + + 6e7f008c-25fb-407f-b5a6-159e86db1952 + Price + price + 3f6619b6-08a4-4be7-8d6a-2761844ee567 + Umbraco.Decimal + true + + + 1 + Product Details + + + Nothing + + + 018cfdbc-4c48-4843-aacc-680441f18972 + Product Name + productName + 0cc0eba1-9960-42c9-bf9b-60e150b429ae + Umbraco.TextBox + true + + + 0 + Product Details + + + Nothing + + + 9228d19f-7085-4cd6-87ce-d74aefe182e4 + SKU + sku + 0cc0eba1-9960-42c9-bf9b-60e150b429ae + Umbraco.TextBox + false + + + 4 + Product Details + + + Nothing + + + + + Product Details + 0 + + + Features + 1 + + + Detailed Description + 2 + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/ContentTypes/products.config b/uSync.Site/uSync/v9/ContentTypes/products.config new file mode 100644 index 00000000..7b8a60e6 --- /dev/null +++ b/uSync.Site/uSync/v9/ContentTypes/products.config @@ -0,0 +1,62 @@ + + + + Products + icon-shopping-basket color-black + folder.png + + False + True + Nothing + false + + contentBase + navigationBase + + Products + + + + + + product + + + + 448be45e-98f0-49db-bb51-08f988e1d763 + Default Currency + defaultCurrency + 28a6aeda-b3fc-4c4d-926e-607854a07891 + Umbraco.DropDown.Flexible + true + + + 0 + Shop + + + Nothing + + + 592eab3b-b3e9-4ba3-9be3-d5ce6f7b7582 + Featured Products + featuredProducts + d0382188-119b-49b7-86d3-84119a02645f + Umbraco.MultiNodeTreePicker + false + + + 1 + Shop + + + Nothing + + + + + Shop + 0 + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/DataTypes/ApprovedColor.config b/uSync.Site/uSync/v9/DataTypes/ApprovedColor.config new file mode 100644 index 00000000..ca116328 --- /dev/null +++ b/uSync.Site/uSync/v9/DataTypes/ApprovedColor.config @@ -0,0 +1,12 @@ + + + + Approved Color + Umbraco.ColorPicker + Nvarchar + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/DataTypes/BlogHowManyPostsShouldBeShownSlider.config b/uSync.Site/uSync/v9/DataTypes/BlogHowManyPostsShouldBeShownSlider.config new file mode 100644 index 00000000..8826a764 --- /dev/null +++ b/uSync.Site/uSync/v9/DataTypes/BlogHowManyPostsShouldBeShownSlider.config @@ -0,0 +1,16 @@ + + + + Blog - How many posts should be shown - Slider + Umbraco.Slider + Nvarchar + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/DataTypes/BlogpostCategoriesTags.config b/uSync.Site/uSync/v9/DataTypes/BlogpostCategoriesTags.config new file mode 100644 index 00000000..efc9c658 --- /dev/null +++ b/uSync.Site/uSync/v9/DataTypes/BlogpostCategoriesTags.config @@ -0,0 +1,13 @@ + + + + Blogpost - Categories - Tags + Umbraco.Tags + Nvarchar + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/DataTypes/CheckboxList.config b/uSync.Site/uSync/v9/DataTypes/CheckboxList.config new file mode 100644 index 00000000..354bf208 --- /dev/null +++ b/uSync.Site/uSync/v9/DataTypes/CheckboxList.config @@ -0,0 +1,11 @@ + + + + Checkbox list + Umbraco.CheckBoxList + Nvarchar + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/DataTypes/ContactContactIntroRichTextEditor.config b/uSync.Site/uSync/v9/DataTypes/ContactContactIntroRichTextEditor.config new file mode 100644 index 00000000..9e896f89 --- /dev/null +++ b/uSync.Site/uSync/v9/DataTypes/ContactContactIntroRichTextEditor.config @@ -0,0 +1,36 @@ + + + + Contact - Contact Intro - Rich Text Editor + Umbraco.TinyMCE + Ntext + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/DataTypes/ContactMapCoordinatesOpenStreetMaps.config b/uSync.Site/uSync/v9/DataTypes/ContactMapCoordinatesOpenStreetMaps.config new file mode 100644 index 00000000..adf8da18 --- /dev/null +++ b/uSync.Site/uSync/v9/DataTypes/ContactMapCoordinatesOpenStreetMaps.config @@ -0,0 +1,9 @@ + + + + Contact - Map Coordinates - Open street maps + Our.Umbraco.OsmMaps + Nvarchar + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/DataTypes/ContactPickAContactFormFormPicker.config b/uSync.Site/uSync/v9/DataTypes/ContactPickAContactFormFormPicker.config new file mode 100644 index 00000000..7b6912d3 --- /dev/null +++ b/uSync.Site/uSync/v9/DataTypes/ContactPickAContactFormFormPicker.config @@ -0,0 +1,11 @@ + + + + Contact - Pick a Contact Form - Form Picker + Umbraco.Label + Nvarchar + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/DataTypes/ContentBaseContentGridLayout.config b/uSync.Site/uSync/v9/DataTypes/ContentBaseContentGridLayout.config new file mode 100644 index 00000000..b0b08ab2 --- /dev/null +++ b/uSync.Site/uSync/v9/DataTypes/ContentBaseContentGridLayout.config @@ -0,0 +1,96 @@ + + + + Content Base - Content - Grid layout + Umbraco.Grid + Ntext + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/DataTypes/ContentPicker.config b/uSync.Site/uSync/v9/DataTypes/ContentPicker.config new file mode 100644 index 00000000..233af08b --- /dev/null +++ b/uSync.Site/uSync/v9/DataTypes/ContentPicker.config @@ -0,0 +1,13 @@ + + + + Content Picker + Umbraco.ContentPicker + Nvarchar + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/DataTypes/DatePicker.config b/uSync.Site/uSync/v9/DataTypes/DatePicker.config new file mode 100644 index 00000000..3f9c5c20 --- /dev/null +++ b/uSync.Site/uSync/v9/DataTypes/DatePicker.config @@ -0,0 +1,12 @@ + + + + Date Picker + Umbraco.DateTime + Date + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/DataTypes/DatePickerWithTime.config b/uSync.Site/uSync/v9/DataTypes/DatePickerWithTime.config new file mode 100644 index 00000000..2c289d17 --- /dev/null +++ b/uSync.Site/uSync/v9/DataTypes/DatePickerWithTime.config @@ -0,0 +1,12 @@ + + + + Date Picker with time + Umbraco.DateTime + Date + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/DataTypes/Dropdown.config b/uSync.Site/uSync/v9/DataTypes/Dropdown.config new file mode 100644 index 00000000..4be476bf --- /dev/null +++ b/uSync.Site/uSync/v9/DataTypes/Dropdown.config @@ -0,0 +1,12 @@ + + + + Dropdown + Umbraco.DropDown.Flexible + Nvarchar + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/DataTypes/DropdownMultiple.config b/uSync.Site/uSync/v9/DataTypes/DropdownMultiple.config new file mode 100644 index 00000000..14076300 --- /dev/null +++ b/uSync.Site/uSync/v9/DataTypes/DropdownMultiple.config @@ -0,0 +1,12 @@ + + + + Dropdown multiple + Umbraco.DropDown.Flexible + Nvarchar + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/DataTypes/HomeCallToActionLinkContentPicker.config b/uSync.Site/uSync/v9/DataTypes/HomeCallToActionLinkContentPicker.config new file mode 100644 index 00000000..ab84110f --- /dev/null +++ b/uSync.Site/uSync/v9/DataTypes/HomeCallToActionLinkContentPicker.config @@ -0,0 +1,13 @@ + + + + Home - Call To Action Link - Content Picker + Umbraco.ContentPicker + Nvarchar + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/DataTypes/HomeColorThemeRadioButtonList.config b/uSync.Site/uSync/v9/DataTypes/HomeColorThemeRadioButtonList.config new file mode 100644 index 00000000..77d9dae8 --- /dev/null +++ b/uSync.Site/uSync/v9/DataTypes/HomeColorThemeRadioButtonList.config @@ -0,0 +1,24 @@ + + + + Home - Color Theme - Radio button list + Umbraco.RadioButtonList + Nvarchar + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/DataTypes/HomeContentGridLayout.config b/uSync.Site/uSync/v9/DataTypes/HomeContentGridLayout.config new file mode 100644 index 00000000..f6dba9f2 --- /dev/null +++ b/uSync.Site/uSync/v9/DataTypes/HomeContentGridLayout.config @@ -0,0 +1,117 @@ + + + + Home - Content - Grid layout + Umbraco.Grid + Ntext + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/DataTypes/HomeFontRadioButtonList.config b/uSync.Site/uSync/v9/DataTypes/HomeFontRadioButtonList.config new file mode 100644 index 00000000..3d178607 --- /dev/null +++ b/uSync.Site/uSync/v9/DataTypes/HomeFontRadioButtonList.config @@ -0,0 +1,24 @@ + + + + Home - Font - Radio button list + Umbraco.RadioButtonList + Nvarchar + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/DataTypes/HomeLogoMediaPicker.config b/uSync.Site/uSync/v9/DataTypes/HomeLogoMediaPicker.config new file mode 100644 index 00000000..d6451617 --- /dev/null +++ b/uSync.Site/uSync/v9/DataTypes/HomeLogoMediaPicker.config @@ -0,0 +1,15 @@ + + + + Home - Logo - Media Picker + Umbraco.MediaPicker + Ntext + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/DataTypes/ImageCropper.config b/uSync.Site/uSync/v9/DataTypes/ImageCropper.config new file mode 100644 index 00000000..ccd91622 --- /dev/null +++ b/uSync.Site/uSync/v9/DataTypes/ImageCropper.config @@ -0,0 +1,11 @@ + + + + Image Cropper + Umbraco.ImageCropper + Ntext + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/DataTypes/LabelBigint.config b/uSync.Site/uSync/v9/DataTypes/LabelBigint.config new file mode 100644 index 00000000..909f50dc --- /dev/null +++ b/uSync.Site/uSync/v9/DataTypes/LabelBigint.config @@ -0,0 +1,11 @@ + + + + Label (bigint) + Umbraco.Label + Nvarchar + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/DataTypes/LabelDatetime.config b/uSync.Site/uSync/v9/DataTypes/LabelDatetime.config new file mode 100644 index 00000000..7163ac97 --- /dev/null +++ b/uSync.Site/uSync/v9/DataTypes/LabelDatetime.config @@ -0,0 +1,11 @@ + + + + Label (datetime) + Umbraco.Label + Date + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/DataTypes/LabelDecimal.config b/uSync.Site/uSync/v9/DataTypes/LabelDecimal.config new file mode 100644 index 00000000..045b4f55 --- /dev/null +++ b/uSync.Site/uSync/v9/DataTypes/LabelDecimal.config @@ -0,0 +1,11 @@ + + + + Label (decimal) + Umbraco.Label + Decimal + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/DataTypes/LabelInteger.config b/uSync.Site/uSync/v9/DataTypes/LabelInteger.config new file mode 100644 index 00000000..19ea1dca --- /dev/null +++ b/uSync.Site/uSync/v9/DataTypes/LabelInteger.config @@ -0,0 +1,11 @@ + + + + Label (integer) + Umbraco.Label + Integer + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/DataTypes/LabelString.config b/uSync.Site/uSync/v9/DataTypes/LabelString.config new file mode 100644 index 00000000..af5067c9 --- /dev/null +++ b/uSync.Site/uSync/v9/DataTypes/LabelString.config @@ -0,0 +1,11 @@ + + + + Label (string) + Umbraco.Label + Nvarchar + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/DataTypes/LabelTime.config b/uSync.Site/uSync/v9/DataTypes/LabelTime.config new file mode 100644 index 00000000..df2170a3 --- /dev/null +++ b/uSync.Site/uSync/v9/DataTypes/LabelTime.config @@ -0,0 +1,11 @@ + + + + Label (time) + Umbraco.Label + Date + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/DataTypes/ListViewContent.config b/uSync.Site/uSync/v9/DataTypes/ListViewContent.config new file mode 100644 index 00000000..74577a98 --- /dev/null +++ b/uSync.Site/uSync/v9/DataTypes/ListViewContent.config @@ -0,0 +1,53 @@ + + + + List View - Content + Umbraco.ListView + Nvarchar + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/DataTypes/ListViewMedia.config b/uSync.Site/uSync/v9/DataTypes/ListViewMedia.config new file mode 100644 index 00000000..80f7b227 --- /dev/null +++ b/uSync.Site/uSync/v9/DataTypes/ListViewMedia.config @@ -0,0 +1,53 @@ + + + + List View - Media + Umbraco.ListView + Nvarchar + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/DataTypes/ListViewMembers.config b/uSync.Site/uSync/v9/DataTypes/ListViewMembers.config new file mode 100644 index 00000000..7640d041 --- /dev/null +++ b/uSync.Site/uSync/v9/DataTypes/ListViewMembers.config @@ -0,0 +1,59 @@ + + + + List View - Members + Umbraco.ListView + Nvarchar + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/DataTypes/MediaPicker.config b/uSync.Site/uSync/v9/DataTypes/MediaPicker.config new file mode 100644 index 00000000..62fc3967 --- /dev/null +++ b/uSync.Site/uSync/v9/DataTypes/MediaPicker.config @@ -0,0 +1,15 @@ + + + + Media Picker + Umbraco.MediaPicker + Ntext + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/DataTypes/MemberPicker.config b/uSync.Site/uSync/v9/DataTypes/MemberPicker.config new file mode 100644 index 00000000..260c1854 --- /dev/null +++ b/uSync.Site/uSync/v9/DataTypes/MemberPicker.config @@ -0,0 +1,9 @@ + + + + Member Picker + Umbraco.MemberPicker + Nvarchar + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/DataTypes/MultiURLPicker.config b/uSync.Site/uSync/v9/DataTypes/MultiURLPicker.config new file mode 100644 index 00000000..20ec7a5e --- /dev/null +++ b/uSync.Site/uSync/v9/DataTypes/MultiURLPicker.config @@ -0,0 +1,14 @@ + + + + Multi URL Picker + Umbraco.MultiUrlPicker + Ntext + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/DataTypes/MultipleMediaPicker.config b/uSync.Site/uSync/v9/DataTypes/MultipleMediaPicker.config new file mode 100644 index 00000000..06b38fd1 --- /dev/null +++ b/uSync.Site/uSync/v9/DataTypes/MultipleMediaPicker.config @@ -0,0 +1,15 @@ + + + + Multiple Media Picker + Umbraco.MediaPicker + Ntext + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/DataTypes/NavigationBaseKeywordsTags.config b/uSync.Site/uSync/v9/DataTypes/NavigationBaseKeywordsTags.config new file mode 100644 index 00000000..c36310e4 --- /dev/null +++ b/uSync.Site/uSync/v9/DataTypes/NavigationBaseKeywordsTags.config @@ -0,0 +1,13 @@ + + + + Navigation Base - Keywords - Tags + Umbraco.Tags + Nvarchar + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/DataTypes/Numeric.config b/uSync.Site/uSync/v9/DataTypes/Numeric.config new file mode 100644 index 00000000..cd6d29bf --- /dev/null +++ b/uSync.Site/uSync/v9/DataTypes/Numeric.config @@ -0,0 +1,9 @@ + + + + Numeric + Umbraco.Integer + Integer + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/DataTypes/PeopleFeaturedPeopleMultinodeTreepicker.config b/uSync.Site/uSync/v9/DataTypes/PeopleFeaturedPeopleMultinodeTreepicker.config new file mode 100644 index 00000000..478f8f5a --- /dev/null +++ b/uSync.Site/uSync/v9/DataTypes/PeopleFeaturedPeopleMultinodeTreepicker.config @@ -0,0 +1,16 @@ + + + + People - Featured People - Multinode Treepicker + Umbraco.MultiNodeTreePicker + Ntext + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/DataTypes/PersonDepartmentTags.config b/uSync.Site/uSync/v9/DataTypes/PersonDepartmentTags.config new file mode 100644 index 00000000..5d395d76 --- /dev/null +++ b/uSync.Site/uSync/v9/DataTypes/PersonDepartmentTags.config @@ -0,0 +1,13 @@ + + + + Person - Department - Tags + Umbraco.Tags + Nvarchar + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/DataTypes/PersonPhotoMediaPicker.config b/uSync.Site/uSync/v9/DataTypes/PersonPhotoMediaPicker.config new file mode 100644 index 00000000..63f46f09 --- /dev/null +++ b/uSync.Site/uSync/v9/DataTypes/PersonPhotoMediaPicker.config @@ -0,0 +1,15 @@ + + + + Person - Photo - Media Picker + Umbraco.MediaPicker + Ntext + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/DataTypes/ProductCategoryTags.config b/uSync.Site/uSync/v9/DataTypes/ProductCategoryTags.config new file mode 100644 index 00000000..b59cc16e --- /dev/null +++ b/uSync.Site/uSync/v9/DataTypes/ProductCategoryTags.config @@ -0,0 +1,13 @@ + + + + Product - Category - Tags + Umbraco.Tags + Nvarchar + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/DataTypes/ProductFeaturesNestedContent.config b/uSync.Site/uSync/v9/DataTypes/ProductFeaturesNestedContent.config new file mode 100644 index 00000000..e4cb49b4 --- /dev/null +++ b/uSync.Site/uSync/v9/DataTypes/ProductFeaturesNestedContent.config @@ -0,0 +1,22 @@ + + + + Product - Features - Nested Content + Umbraco.NestedContent + Ntext + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/DataTypes/ProductPhotosMediaPicker.config b/uSync.Site/uSync/v9/DataTypes/ProductPhotosMediaPicker.config new file mode 100644 index 00000000..944703c8 --- /dev/null +++ b/uSync.Site/uSync/v9/DataTypes/ProductPhotosMediaPicker.config @@ -0,0 +1,15 @@ + + + + Product - Photos - Media Picker + Umbraco.MediaPicker + Ntext + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/DataTypes/ProductPriceDecimal.config b/uSync.Site/uSync/v9/DataTypes/ProductPriceDecimal.config new file mode 100644 index 00000000..ce42999c --- /dev/null +++ b/uSync.Site/uSync/v9/DataTypes/ProductPriceDecimal.config @@ -0,0 +1,9 @@ + + + + Product - Price - Decimal + Umbraco.Decimal + Decimal + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/DataTypes/ProductsDefaultCurrencyDropdownList.config b/uSync.Site/uSync/v9/DataTypes/ProductsDefaultCurrencyDropdownList.config new file mode 100644 index 00000000..f6304242 --- /dev/null +++ b/uSync.Site/uSync/v9/DataTypes/ProductsDefaultCurrencyDropdownList.config @@ -0,0 +1,29 @@ + + + + Products - Default Currency - Dropdown list + Umbraco.DropDown.Flexible + Nvarchar + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/DataTypes/ProductsFeaturedProductsMultinodeTreepicker.config b/uSync.Site/uSync/v9/DataTypes/ProductsFeaturedProductsMultinodeTreepicker.config new file mode 100644 index 00000000..5c13a13f --- /dev/null +++ b/uSync.Site/uSync/v9/DataTypes/ProductsFeaturedProductsMultinodeTreepicker.config @@ -0,0 +1,16 @@ + + + + Products - Featured Products - Multinode Treepicker + Umbraco.MultiNodeTreePicker + Ntext + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/DataTypes/Radiobox.config b/uSync.Site/uSync/v9/DataTypes/Radiobox.config new file mode 100644 index 00000000..a166cb7c --- /dev/null +++ b/uSync.Site/uSync/v9/DataTypes/Radiobox.config @@ -0,0 +1,11 @@ + + + + Radiobox + Umbraco.RadioButtonList + Nvarchar + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/DataTypes/RichtextEditor.config b/uSync.Site/uSync/v9/DataTypes/RichtextEditor.config new file mode 100644 index 00000000..b8d9e113 --- /dev/null +++ b/uSync.Site/uSync/v9/DataTypes/RichtextEditor.config @@ -0,0 +1,14 @@ + + + + Richtext editor + Umbraco.TinyMCE + Ntext + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/DataTypes/Tags.config b/uSync.Site/uSync/v9/DataTypes/Tags.config new file mode 100644 index 00000000..fc1025e3 --- /dev/null +++ b/uSync.Site/uSync/v9/DataTypes/Tags.config @@ -0,0 +1,13 @@ + + + + Tags + Umbraco.Tags + Ntext + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/DataTypes/Textarea.config b/uSync.Site/uSync/v9/DataTypes/Textarea.config new file mode 100644 index 00000000..a495b9e3 --- /dev/null +++ b/uSync.Site/uSync/v9/DataTypes/Textarea.config @@ -0,0 +1,12 @@ + + + + Textarea + Umbraco.TextArea + Ntext + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/DataTypes/Textstring.config b/uSync.Site/uSync/v9/DataTypes/Textstring.config new file mode 100644 index 00000000..dc90bf0a --- /dev/null +++ b/uSync.Site/uSync/v9/DataTypes/Textstring.config @@ -0,0 +1,11 @@ + + + + Textstring + Umbraco.TextBox + Nvarchar + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/DataTypes/TrueFalse.config b/uSync.Site/uSync/v9/DataTypes/TrueFalse.config new file mode 100644 index 00000000..489b5a27 --- /dev/null +++ b/uSync.Site/uSync/v9/DataTypes/TrueFalse.config @@ -0,0 +1,12 @@ + + + + True/false + Umbraco.TrueFalse + Integer + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/DataTypes/Upload.config b/uSync.Site/uSync/v9/DataTypes/Upload.config new file mode 100644 index 00000000..7ef72792 --- /dev/null +++ b/uSync.Site/uSync/v9/DataTypes/Upload.config @@ -0,0 +1,9 @@ + + + + Upload + Umbraco.UploadField + Nvarchar + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/Languages/de.config b/uSync.Site/uSync/v9/Languages/de.config new file mode 100644 index 00000000..a53532da --- /dev/null +++ b/uSync.Site/uSync/v9/Languages/de.config @@ -0,0 +1,6 @@ + + + de + false + false + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/Languages/en-us.config b/uSync.Site/uSync/v9/Languages/en-us.config new file mode 100644 index 00000000..c2fe77b8 --- /dev/null +++ b/uSync.Site/uSync/v9/Languages/en-us.config @@ -0,0 +1,6 @@ + + + en-US + false + true + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/Macros/featuredProduct.config b/uSync.Site/uSync/v9/Macros/featuredProduct.config new file mode 100644 index 00000000..242d6272 --- /dev/null +++ b/uSync.Site/uSync/v9/Macros/featuredProduct.config @@ -0,0 +1,19 @@ + + + Select Featured Products + ~/Views/MacroPartials/FeaturedProducts.cshtml + PartialView + true + false + false + false + 0 + + + Choose Product + product + 0 + Umbraco.ContentPicker + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/Macros/latestBlogposts.config b/uSync.Site/uSync/v9/Macros/latestBlogposts.config new file mode 100644 index 00000000..789e3f7b --- /dev/null +++ b/uSync.Site/uSync/v9/Macros/latestBlogposts.config @@ -0,0 +1,25 @@ + + + Get Latest Blogposts + ~/Views/MacroPartials/LatestBlogposts.cshtml + PartialView + true + false + false + false + 0 + + + How many posts should be shown + numberOfPosts + 0 + Umbraco.Integer + + + Where to get blog posts from + startNodeId + 1 + Umbraco.ContentPicker + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/Media/banjo.config b/uSync.Site/uSync/v9/Media/banjo.config new file mode 100644 index 00000000..5ab25f3a --- /dev/null +++ b/uSync.Site/uSync/v9/Media/banjo.config @@ -0,0 +1,18 @@ + + + + Products + /Products/Banjo + false + Image + 2020-08-26T10:43:41 + + 0 + 1580162923638178247245911192021241154743 + + + + + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/Media/biker-jacket.config b/uSync.Site/uSync/v9/Media/biker-jacket.config new file mode 100644 index 00000000..3704737c --- /dev/null +++ b/uSync.Site/uSync/v9/Media/biker-jacket.config @@ -0,0 +1,18 @@ + + + + Products + /Products/BikerJacket + false + Image + 2020-08-26T10:43:40 + + 0 + 1993981874888116020747232218226851924 + + + + + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/Media/bowling-ball.config b/uSync.Site/uSync/v9/Media/bowling-ball.config new file mode 100644 index 00000000..9070e8be --- /dev/null +++ b/uSync.Site/uSync/v9/Media/bowling-ball.config @@ -0,0 +1,18 @@ + + + + Products + /Products/BowlingBall + false + Image + 2020-08-26T10:43:41 + + 0 + 79188852252231087824410411915512215355229254 + + + + + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/Media/design.config b/uSync.Site/uSync/v9/Media/design.config new file mode 100644 index 00000000..1f822297 --- /dev/null +++ b/uSync.Site/uSync/v9/Media/design.config @@ -0,0 +1,14 @@ + + + + + /Design + false + Folder + 2020-08-26T10:43:40 + + 1 + + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/Media/jan-skovgaard.config b/uSync.Site/uSync/v9/Media/jan-skovgaard.config new file mode 100644 index 00000000..2ab98e4a --- /dev/null +++ b/uSync.Site/uSync/v9/Media/jan-skovgaard.config @@ -0,0 +1,18 @@ + + + + People + /People/JanSkovgaard + false + Image + 2020-08-26T10:43:41 + + 0 + 0114175271169821511011921524547142144213252 + + + + + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/Media/jeavon-leopold.config b/uSync.Site/uSync/v9/Media/jeavon-leopold.config new file mode 100644 index 00000000..e8b5c26d --- /dev/null +++ b/uSync.Site/uSync/v9/Media/jeavon-leopold.config @@ -0,0 +1,18 @@ + + + + People + /People/JeavonLeopold + false + Image + 2020-08-26T10:43:41 + + 0 + 765875611587925517471486111210240119140 + + + + + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/Media/jeroen-breuer.config b/uSync.Site/uSync/v9/Media/jeroen-breuer.config new file mode 100644 index 00000000..b81e0de2 --- /dev/null +++ b/uSync.Site/uSync/v9/Media/jeroen-breuer.config @@ -0,0 +1,18 @@ + + + + People + /People/JeroenBreuer + false + Image + 2020-08-26T10:43:42 + + 0 + 113125113111020814813487132127531226525531 + + + + + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/Media/jumpsuit.config b/uSync.Site/uSync/v9/Media/jumpsuit.config new file mode 100644 index 00000000..28feb4fd --- /dev/null +++ b/uSync.Site/uSync/v9/Media/jumpsuit.config @@ -0,0 +1,18 @@ + + + + Products + /Products/Jumpsuit + false + Image + 2020-08-26T10:43:41 + + 0 + 18610022815721119522064110147701124814172244 + + + + + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/Media/knitted-west.config b/uSync.Site/uSync/v9/Media/knitted-west.config new file mode 100644 index 00000000..a74a98ae --- /dev/null +++ b/uSync.Site/uSync/v9/Media/knitted-west.config @@ -0,0 +1,18 @@ + + + + Products + /Products/KnittedWest + false + Image + 2020-08-26T10:43:41 + + 0 + 1691905584601056918982096725417888 + + + + + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/Media/lee-kelleher.config b/uSync.Site/uSync/v9/Media/lee-kelleher.config new file mode 100644 index 00000000..64b83d3b --- /dev/null +++ b/uSync.Site/uSync/v9/Media/lee-kelleher.config @@ -0,0 +1,18 @@ + + + + People + /People/LeeKelleher + false + Image + 2020-08-26T10:43:41 + + 0 + 159917583101351161401224821681304568172 + + + + + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/Media/matt-brailsford.config b/uSync.Site/uSync/v9/Media/matt-brailsford.config new file mode 100644 index 00000000..dbe1e399 --- /dev/null +++ b/uSync.Site/uSync/v9/Media/matt-brailsford.config @@ -0,0 +1,18 @@ + + + + People + /People/MattBrailsford + false + Image + 2020-08-26T10:43:41 + + 0 + 99122152183203931151882232468633646217237 + + + + + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/Media/people.config b/uSync.Site/uSync/v9/Media/people.config new file mode 100644 index 00000000..84b887a6 --- /dev/null +++ b/uSync.Site/uSync/v9/Media/people.config @@ -0,0 +1,14 @@ + + + + + /People + false + Folder + 2020-08-26T10:43:40 + + 1 + + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/Media/ping-pong-ball.config b/uSync.Site/uSync/v9/Media/ping-pong-ball.config new file mode 100644 index 00000000..d8950c93 --- /dev/null +++ b/uSync.Site/uSync/v9/Media/ping-pong-ball.config @@ -0,0 +1,18 @@ + + + + Products + /Products/PingPongBall + false + Image + 2020-08-26T10:43:41 + + 0 + 15542351374882242091149520024574230135146 + + + + + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/Media/products.config b/uSync.Site/uSync/v9/Media/products.config new file mode 100644 index 00000000..0a6566c0 --- /dev/null +++ b/uSync.Site/uSync/v9/Media/products.config @@ -0,0 +1,14 @@ + + + + + /Products + false + Folder + 2020-08-26T10:43:40 + + 1 + + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/Media/tattoo.config b/uSync.Site/uSync/v9/Media/tattoo.config new file mode 100644 index 00000000..cfea0787 --- /dev/null +++ b/uSync.Site/uSync/v9/Media/tattoo.config @@ -0,0 +1,18 @@ + + + + Products + /Products/Tattoo + false + Image + 2020-08-26T10:43:40 + + 0 + 71321841485820626111822135372179225166 + + + + + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/Media/umbraco-campari-meeting-room.config b/uSync.Site/uSync/v9/Media/umbraco-campari-meeting-room.config new file mode 100644 index 00000000..e555cbc7 --- /dev/null +++ b/uSync.Site/uSync/v9/Media/umbraco-campari-meeting-room.config @@ -0,0 +1,18 @@ + + + + Design + /Design/UmbracoCampariMeetingRoom + false + Image + 2020-08-26T10:43:40 + + 0 + 10679217199237208296821512123318421840112164 + + + + + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/Media/unicorn.config b/uSync.Site/uSync/v9/Media/unicorn.config new file mode 100644 index 00000000..0fe30122 --- /dev/null +++ b/uSync.Site/uSync/v9/Media/unicorn.config @@ -0,0 +1,18 @@ + + + + Products + /Products/Unicorn + false + Image + 2020-08-26T10:43:40 + + 0 + 602361411241152205684561302294211023847156 + + + + + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/MediaTypes/file.config b/uSync.Site/uSync/v9/MediaTypes/file.config new file mode 100644 index 00000000..7ed079ac --- /dev/null +++ b/uSync.Site/uSync/v9/MediaTypes/file.config @@ -0,0 +1,65 @@ + + + + File + icon-document + icon-document + + True + False + Nothing + false + + + + + 0000001a-0000-0000-0000-000000000000 + Size + umbracoBytes + 930861bf-e262-4ead-a704-f99453565708 + Umbraco.Label + false + + + 2 + File + + + + + 00000019-0000-0000-0000-000000000000 + Type + umbracoExtension + f0bc4bfb-b499-40d6-ba86-058885a5178c + Umbraco.Label + false + + + 1 + File + + + + + 00000018-0000-0000-0000-000000000000 + Upload file + umbracoFile + 84c6b441-31df-4ffe-b67e-67d5bc3ae65a + Umbraco.UploadField + true + + + 0 + File + + + + + + + + File + 1 + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/MediaTypes/folder.config b/uSync.Site/uSync/v9/MediaTypes/folder.config new file mode 100644 index 00000000..212ee4be --- /dev/null +++ b/uSync.Site/uSync/v9/MediaTypes/folder.config @@ -0,0 +1,21 @@ + + + + Folder + icon-folder + icon-folder + + True + False + Nothing + false + + + + + Folder + Image + File + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/MediaTypes/image.config b/uSync.Site/uSync/v9/MediaTypes/image.config new file mode 100644 index 00000000..45bf93e0 --- /dev/null +++ b/uSync.Site/uSync/v9/MediaTypes/image.config @@ -0,0 +1,93 @@ + + + + Image + icon-picture + icon-picture + + True + False + Nothing + false + + + + + 00000009-0000-0000-0000-000000000000 + Size + umbracoBytes + 930861bf-e262-4ead-a704-f99453565708 + Umbraco.Label + false + + + 3 + Image + + + + + 0000000a-0000-0000-0000-000000000000 + Type + umbracoExtension + f0bc4bfb-b499-40d6-ba86-058885a5178c + Umbraco.Label + false + + + 4 + Image + + + + + 00000006-0000-0000-0000-000000000000 + Upload image + umbracoFile + 1df9f033-e6d4-451f-b8d2-e0cbc50a836f + Umbraco.ImageCropper + true + + + 0 + Image + + + + + 00000008-0000-0000-0000-000000000000 + Height + umbracoHeight + 8e7f995c-bd81-4627-9932-c40e568ec788 + Umbraco.Label + false + + + 2 + Image + + + + + 00000007-0000-0000-0000-000000000000 + Width + umbracoWidth + 8e7f995c-bd81-4627-9932-c40e568ec788 + Umbraco.Label + false + + + 1 + Image + + + + + + + + Image + 1 + + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/Templates/blog.config b/uSync.Site/uSync/v9/Templates/blog.config new file mode 100644 index 00000000..62bf5619 --- /dev/null +++ b/uSync.Site/uSync/v9/Templates/blog.config @@ -0,0 +1,5 @@ + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/Templates/blogpost.config b/uSync.Site/uSync/v9/Templates/blogpost.config new file mode 100644 index 00000000..56fc28f9 --- /dev/null +++ b/uSync.Site/uSync/v9/Templates/blogpost.config @@ -0,0 +1,5 @@ + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/Templates/contact.config b/uSync.Site/uSync/v9/Templates/contact.config new file mode 100644 index 00000000..381631c9 --- /dev/null +++ b/uSync.Site/uSync/v9/Templates/contact.config @@ -0,0 +1,5 @@ + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/Templates/contentpage.config b/uSync.Site/uSync/v9/Templates/contentpage.config new file mode 100644 index 00000000..7aea86f9 --- /dev/null +++ b/uSync.Site/uSync/v9/Templates/contentpage.config @@ -0,0 +1,5 @@ + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/Templates/home.config b/uSync.Site/uSync/v9/Templates/home.config new file mode 100644 index 00000000..73f84f6e --- /dev/null +++ b/uSync.Site/uSync/v9/Templates/home.config @@ -0,0 +1,5 @@ + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/Templates/master.config b/uSync.Site/uSync/v9/Templates/master.config new file mode 100644 index 00000000..5126c747 --- /dev/null +++ b/uSync.Site/uSync/v9/Templates/master.config @@ -0,0 +1,5 @@ + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/Templates/people.config b/uSync.Site/uSync/v9/Templates/people.config new file mode 100644 index 00000000..ee3bfa3d --- /dev/null +++ b/uSync.Site/uSync/v9/Templates/people.config @@ -0,0 +1,5 @@ + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/Templates/person.config b/uSync.Site/uSync/v9/Templates/person.config new file mode 100644 index 00000000..4a2c0a5b --- /dev/null +++ b/uSync.Site/uSync/v9/Templates/person.config @@ -0,0 +1,5 @@ + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/Templates/product.config b/uSync.Site/uSync/v9/Templates/product.config new file mode 100644 index 00000000..f76838a0 --- /dev/null +++ b/uSync.Site/uSync/v9/Templates/product.config @@ -0,0 +1,5 @@ + + \ No newline at end of file diff --git a/uSync.Site/uSync/v9/Templates/products.config b/uSync.Site/uSync/v9/Templates/products.config new file mode 100644 index 00000000..b12a3363 --- /dev/null +++ b/uSync.Site/uSync/v9/Templates/products.config @@ -0,0 +1,5 @@ + + \ No newline at end of file diff --git a/uSync8.Site/App_Plugins/uSync8/addons.json b/uSync.Site/wwwroot/App_Plugins/uSync8/addons.json similarity index 100% rename from uSync8.Site/App_Plugins/uSync8/addons.json rename to uSync.Site/wwwroot/App_Plugins/uSync8/addons.json diff --git a/uSync8.Site/App_Plugins/uSync8/backoffice/uSync8/dashboard.html b/uSync.Site/wwwroot/App_Plugins/uSync8/backoffice/uSync8/dashboard.html similarity index 73% rename from uSync8.Site/App_Plugins/uSync8/backoffice/uSync8/dashboard.html rename to uSync.Site/wwwroot/App_Plugins/uSync8/backoffice/uSync8/dashboard.html index 25ad5669..bc108ce3 100644 --- a/uSync8.Site/App_Plugins/uSync8/backoffice/uSync8/dashboard.html +++ b/uSync.Site/wwwroot/App_Plugins/uSync8/backoffice/uSync8/dashboard.html @@ -1,13 +1,11 @@ -
+
- diff --git a/uSync8.Site/App_Plugins/uSync8/backoffice/uSync8/uSyncDashboardController.js b/uSync.Site/wwwroot/App_Plugins/uSync8/backoffice/uSync8/uSyncDashboardController.js similarity index 70% rename from uSync8.Site/App_Plugins/uSync8/backoffice/uSync8/uSyncDashboardController.js rename to uSync.Site/wwwroot/App_Plugins/uSync8/backoffice/uSync8/uSyncDashboardController.js index f807ddb4..ed611496 100644 --- a/uSync8.Site/App_Plugins/uSync8/backoffice/uSync8/uSyncDashboardController.js +++ b/uSync.Site/wwwroot/App_Plugins/uSync8/backoffice/uSync8/uSyncDashboardController.js @@ -1,4 +1,4 @@ -(function () { +(function () { 'use strict'; function dashboardController( @@ -7,8 +7,8 @@ var vm = this; vm.page = { - title: 'uSync 8', - description: '8.1.x', + title: 'uSync 9.Core', + description: '9.x', navigation: [ { 'name': 'uSync', @@ -36,28 +36,21 @@ navigationService.syncTree({ tree: "uSync8", path: "-1" }); }); - uSync8DashboardService.getAddOns() .then(function (result) { - vm.page.description = 'v' + result.data.Version; - if (result.data.AddOnString.length > 0) { - vm.page.description += ' + ' + result.data.AddOnString; - } - vm.addOns = result.data.AddOns; - + vm.addOns = result.data.addOns; vm.addOns.forEach(function (value, key) { - if (value.View !== '') { - vm.page.navigation.splice(vm.page.navigation.length-2, 0, - { - 'name': value.DisplayName, - 'alias': value.Alias, - 'icon': value.Icon, - 'view': value.View - }); + if (value.view !== '') { + vm.page.navigation.splice(vm.page.navigation.length - 2, 0, + { + 'name': value.displayName, + 'alias': value.alias, + 'icon': value.icon, + 'view': value.view + }); } }); }); - } angular.module('umbraco') diff --git a/uSync8.Site/App_Plugins/uSync8/changeDialog.html b/uSync.Site/wwwroot/App_Plugins/uSync8/changeDialog.html similarity index 98% rename from uSync8.Site/App_Plugins/uSync8/changeDialog.html rename to uSync.Site/wwwroot/App_Plugins/uSync8/changeDialog.html index 6e5e5515..938a2d75 100644 --- a/uSync8.Site/App_Plugins/uSync8/changeDialog.html +++ b/uSync.Site/wwwroot/App_Plugins/uSync8/changeDialog.html @@ -1,4 +1,4 @@ -
+
+

{{vm.status.Message}}

diff --git a/uSync8.Site/App_Plugins/uSync8/components/uSyncReportView.html b/uSync.Site/wwwroot/App_Plugins/uSync8/components/uSyncReportView.html similarity index 85% rename from uSync8.Site/App_Plugins/uSync8/components/uSyncReportView.html rename to uSync.Site/wwwroot/App_Plugins/uSync8/components/uSyncReportView.html index 9b841870..a70d922a 100644 --- a/uSync8.Site/App_Plugins/uSync8/components/uSyncReportView.html +++ b/uSync.Site/wwwroot/App_Plugins/uSync8/components/uSyncReportView.html @@ -1,4 +1,4 @@ -
+
@@ -11,7 +11,8 @@ label-on="Show all" label-off="Changes only" label-position="left" - ng-if="vm.runMode = 'report'"> + ng-if="!vm.hideToggle"> +
@@ -36,31 +37,31 @@
-
+
- +
- {{vm.getTypeName(result.ItemType)}} + {{vm.getTypeName(result.itemType)}}
- {{result.Name}} + {{result.name}}
- {{result.Change}} + {{result.change}}
- +
diff --git a/uSync8.Site/App_Plugins/uSync8/components/uSyncReportViewComponent.js b/uSync.Site/wwwroot/App_Plugins/uSync8/components/uSyncReportViewComponent.js similarity index 94% rename from uSync8.Site/App_Plugins/uSync8/components/uSyncReportViewComponent.js rename to uSync.Site/wwwroot/App_Plugins/uSync8/components/uSyncReportViewComponent.js index 53e546c3..38f0b29b 100644 --- a/uSync8.Site/App_Plugins/uSync8/components/uSyncReportViewComponent.js +++ b/uSync.Site/wwwroot/App_Plugins/uSync8/components/uSyncReportViewComponent.js @@ -1,4 +1,4 @@ -(function () { +(function () { 'use strict'; var uSyncReportViewComponent = { @@ -8,7 +8,8 @@ results: '<', hideAction: '<', hideLink: '<', - showAll: '<' + showAll: '<', + hideToggle: '<' }, controllerAs: 'vm', controller: uSyncReportViewController @@ -58,8 +59,7 @@ } function getTypeName(typeName) { - var umbType = typeName.substring(0, typeName.indexOf(',')); - return umbType.substring(umbType.lastIndexOf('.') + 1); + return typeName.substring(typeName.lastIndexOf('.') + 1); } function countChanges(changes) { diff --git a/uSync8.Site/App_Plugins/uSync8/components/usyncProgressViewComponent.js b/uSync.Site/wwwroot/App_Plugins/uSync8/components/usyncProgressViewComponent.js similarity index 97% rename from uSync8.Site/App_Plugins/uSync8/components/usyncProgressViewComponent.js rename to uSync.Site/wwwroot/App_Plugins/uSync8/components/usyncProgressViewComponent.js index 4ba0fcd2..ebebe67b 100644 --- a/uSync8.Site/App_Plugins/uSync8/components/usyncProgressViewComponent.js +++ b/uSync.Site/wwwroot/App_Plugins/uSync8/components/usyncProgressViewComponent.js @@ -1,4 +1,4 @@ -(function () { +(function () { 'use strict'; var uSyncProgressViewComponent = { diff --git a/uSync8.Site/App_Plugins/uSync8/lang/en-US.xml b/uSync.Site/wwwroot/App_Plugins/uSync8/lang/en-US.xml similarity index 96% rename from uSync8.Site/App_Plugins/uSync8/lang/en-US.xml rename to uSync.Site/wwwroot/App_Plugins/uSync8/lang/en-US.xml index 9fe3e0af..c561443c 100644 --- a/uSync8.Site/App_Plugins/uSync8/lang/en-US.xml +++ b/uSync.Site/wwwroot/App_Plugins/uSync8/lang/en-US.xml @@ -1,4 +1,4 @@ - + Jumoo diff --git a/uSync8.Site/App_Plugins/uSync8/package.manifest b/uSync.Site/wwwroot/App_Plugins/uSync8/package.manifest similarity index 100% rename from uSync8.Site/App_Plugins/uSync8/package.manifest rename to uSync.Site/wwwroot/App_Plugins/uSync8/package.manifest diff --git a/uSync8.Site/App_Plugins/uSync8/settings/default.html b/uSync.Site/wwwroot/App_Plugins/uSync8/settings/default.html similarity index 90% rename from uSync8.Site/App_Plugins/uSync8/settings/default.html rename to uSync.Site/wwwroot/App_Plugins/uSync8/settings/default.html index d4a3521f..b091a52d 100644 --- a/uSync8.Site/App_Plugins/uSync8/settings/default.html +++ b/uSync.Site/wwwroot/App_Plugins/uSync8/settings/default.html @@ -1,14 +1,15 @@ -
+
-
- [v{{vm.versionInfo.VersionInfo.Core}}] - + +
+ [v{{vm.versionInfo.versionInfo.core}}] + {{vm.versionInfo.VersionInfo.Message}}
- +
@@ -47,6 +48,7 @@
+
{{vm.version}}
{{vm.savings.title}} {{vm.savings.message}}
diff --git a/uSync8.Site/App_Plugins/uSync8/settings/expansion.html b/uSync.Site/wwwroot/App_Plugins/uSync8/settings/expansion.html similarity index 89% rename from uSync8.Site/App_Plugins/uSync8/settings/expansion.html rename to uSync.Site/wwwroot/App_Plugins/uSync8/settings/expansion.html index 0aa012ef..9b687da1 100644 --- a/uSync8.Site/App_Plugins/uSync8/settings/expansion.html +++ b/uSync.Site/wwwroot/App_Plugins/uSync8/settings/expansion.html @@ -1,4 +1,4 @@ -
+
diff --git a/uSync8.Site/App_Plugins/uSync8/settings/expansionController.js b/uSync.Site/wwwroot/App_Plugins/uSync8/settings/expansionController.js similarity index 96% rename from uSync8.Site/App_Plugins/uSync8/settings/expansionController.js rename to uSync.Site/wwwroot/App_Plugins/uSync8/settings/expansionController.js index a5ecbd04..80e8781f 100644 --- a/uSync8.Site/App_Plugins/uSync8/settings/expansionController.js +++ b/uSync.Site/wwwroot/App_Plugins/uSync8/settings/expansionController.js @@ -1,4 +1,4 @@ -(function () { +(function () { 'use strict'; diff --git a/uSync8.Site/App_Plugins/uSync8/settings/settings.html b/uSync.Site/wwwroot/App_Plugins/uSync8/settings/settings.html similarity index 99% rename from uSync8.Site/App_Plugins/uSync8/settings/settings.html rename to uSync.Site/wwwroot/App_Plugins/uSync8/settings/settings.html index 9243052a..f9daa01b 100644 --- a/uSync8.Site/App_Plugins/uSync8/settings/settings.html +++ b/uSync.Site/wwwroot/App_Plugins/uSync8/settings/settings.html @@ -1,4 +1,4 @@ -
+
diff --git a/uSync8.Site/App_Plugins/uSync8/settings/settingsController.js b/uSync.Site/wwwroot/App_Plugins/uSync8/settings/settingsController.js similarity index 98% rename from uSync8.Site/App_Plugins/uSync8/settings/settingsController.js rename to uSync.Site/wwwroot/App_Plugins/uSync8/settings/settingsController.js index 5d41d68d..343a0594 100644 --- a/uSync8.Site/App_Plugins/uSync8/settings/settingsController.js +++ b/uSync.Site/wwwroot/App_Plugins/uSync8/settings/settingsController.js @@ -1,4 +1,4 @@ -(function () { +(function () { 'use strict'; function settingsController($scope, diff --git a/uSync8.Site/App_Plugins/uSync8/settings/uSyncController.js b/uSync.Site/wwwroot/App_Plugins/uSync8/settings/uSyncController.js similarity index 96% rename from uSync8.Site/App_Plugins/uSync8/settings/uSyncController.js rename to uSync.Site/wwwroot/App_Plugins/uSync8/settings/uSyncController.js index 9aa0f09a..4a2327ab 100644 --- a/uSync8.Site/App_Plugins/uSync8/settings/uSyncController.js +++ b/uSync.Site/wwwroot/App_Plugins/uSync8/settings/uSyncController.js @@ -1,4 +1,4 @@ -(function () { +(function () { 'use strict'; function uSyncController($scope, @@ -109,9 +109,19 @@ uSync8DashboardService.checkVersion() .then(function (result) { vm.versionInfo = result.data; - }) + }); + + uSync8DashboardService.getAddOns() + .then(function (result) { + vm.version = 'v' + result.data.version; + if (result.data.addOnString.length > 0) { + vm.version += ' + ' + result.data.addOnString; + } + }); } + + /////////// function report(group) { resetStatus(modes.REPORT); @@ -158,7 +168,7 @@ function importItems(force, group) { resetStatus(modes.IMPORT); - vm.hideLink = true; + vm.hideLink = false; vm.importButton.state = 'busy'; uSync8DashboardService.importItems(force, group, getClientId()) diff --git a/uSync8.Site/App_Plugins/uSync8/uSyncHub.js b/uSync.Site/wwwroot/App_Plugins/uSync8/uSyncHub.js similarity index 99% rename from uSync8.Site/App_Plugins/uSync8/uSyncHub.js rename to uSync.Site/wwwroot/App_Plugins/uSync8/uSyncHub.js index 94ed42b4..2e0fdbc5 100644 --- a/uSync8.Site/App_Plugins/uSync8/uSyncHub.js +++ b/uSync.Site/wwwroot/App_Plugins/uSync8/uSyncHub.js @@ -1,4 +1,4 @@ -(function () { +(function () { 'use strict'; function uSyncHub($rootScope, $q, assetsService) { diff --git a/uSync8.Site/App_Plugins/uSync8/uSyncService.js b/uSync.Site/wwwroot/App_Plugins/uSync8/uSyncService.js similarity index 99% rename from uSync8.Site/App_Plugins/uSync8/uSyncService.js rename to uSync.Site/wwwroot/App_Plugins/uSync8/uSyncService.js index a7a68de9..bf460607 100644 --- a/uSync8.Site/App_Plugins/uSync8/uSyncService.js +++ b/uSync.Site/wwwroot/App_Plugins/uSync8/uSyncService.js @@ -1,4 +1,4 @@ -/** +/** * @ngdoc * @name uSync8Service * @requires $http diff --git a/uSync.Site/wwwroot/App_Plugins/uSync8/uSync_864.js b/uSync.Site/wwwroot/App_Plugins/uSync8/uSync_864.js new file mode 100644 index 00000000..84be5970 --- /dev/null +++ b/uSync.Site/wwwroot/App_Plugins/uSync8/uSync_864.js @@ -0,0 +1 @@ +// cache breaker. \ No newline at end of file diff --git a/uSync8.Site/App_Plugins/uSync8/usync.css b/uSync.Site/wwwroot/App_Plugins/uSync8/usync.css similarity index 99% rename from uSync8.Site/App_Plugins/uSync8/usync.css rename to uSync.Site/wwwroot/App_Plugins/uSync8/usync.css index 799f9a98..5434176f 100644 --- a/uSync8.Site/App_Plugins/uSync8/usync.css +++ b/uSync.Site/wwwroot/App_Plugins/uSync8/usync.css @@ -1,4 +1,4 @@ -.usync-main { +.usync-main { flex: 1 1 auto; margin-right: 20px; width: calc(100% - 370px); diff --git a/uSync.Site/wwwroot/App_Plugins/uSync8/usync_864.css b/uSync.Site/wwwroot/App_Plugins/uSync8/usync_864.css new file mode 100644 index 00000000..fa2659f0 --- /dev/null +++ b/uSync.Site/wwwroot/App_Plugins/uSync8/usync_864.css @@ -0,0 +1 @@ +/* cache breaker */ \ No newline at end of file diff --git a/uSync.Site/wwwroot/media/0vkj05xm/18530280048_459b8b61b2_h.jpg b/uSync.Site/wwwroot/media/0vkj05xm/18530280048_459b8b61b2_h.jpg new file mode 100644 index 00000000..51e5d8af Binary files /dev/null and b/uSync.Site/wwwroot/media/0vkj05xm/18530280048_459b8b61b2_h.jpg differ diff --git a/uSync.Site/wwwroot/media/354lcfv5/18095416144_44a566a5f4_h.jpg b/uSync.Site/wwwroot/media/354lcfv5/18095416144_44a566a5f4_h.jpg new file mode 100644 index 00000000..003c1c1d Binary files /dev/null and b/uSync.Site/wwwroot/media/354lcfv5/18095416144_44a566a5f4_h.jpg differ diff --git a/uSync.Site/wwwroot/media/SK_Temp/14272036539_469ca21d5c_h.jpg b/uSync.Site/wwwroot/media/SK_Temp/14272036539_469ca21d5c_h.jpg new file mode 100644 index 00000000..fd3819f2 Binary files /dev/null and b/uSync.Site/wwwroot/media/SK_Temp/14272036539_469ca21d5c_h.jpg differ diff --git a/uSync.Site/wwwroot/media/SK_Temp/16403439029_f500be349b_o.jpg b/uSync.Site/wwwroot/media/SK_Temp/16403439029_f500be349b_o.jpg new file mode 100644 index 00000000..f566630f Binary files /dev/null and b/uSync.Site/wwwroot/media/SK_Temp/16403439029_f500be349b_o.jpg differ diff --git a/uSync.Site/wwwroot/media/SK_Temp/18095416144_44a566a5f4_h.jpg b/uSync.Site/wwwroot/media/SK_Temp/18095416144_44a566a5f4_h.jpg new file mode 100644 index 00000000..003c1c1d Binary files /dev/null and b/uSync.Site/wwwroot/media/SK_Temp/18095416144_44a566a5f4_h.jpg differ diff --git a/uSync.Site/wwwroot/media/SK_Temp/18530280048_459b8b61b2_h.jpg b/uSync.Site/wwwroot/media/SK_Temp/18530280048_459b8b61b2_h.jpg new file mode 100644 index 00000000..51e5d8af Binary files /dev/null and b/uSync.Site/wwwroot/media/SK_Temp/18530280048_459b8b61b2_h.jpg differ diff --git a/uSync.Site/wwwroot/media/SK_Temp/18531852339_981b067419_h.jpg b/uSync.Site/wwwroot/media/SK_Temp/18531852339_981b067419_h.jpg new file mode 100644 index 00000000..2352503b Binary files /dev/null and b/uSync.Site/wwwroot/media/SK_Temp/18531852339_981b067419_h.jpg differ diff --git a/uSync.Site/wwwroot/media/SK_Temp/18531854019_351c579559_h.jpg b/uSync.Site/wwwroot/media/SK_Temp/18531854019_351c579559_h.jpg new file mode 100644 index 00000000..72dadd08 Binary files /dev/null and b/uSync.Site/wwwroot/media/SK_Temp/18531854019_351c579559_h.jpg differ diff --git a/uSync.Site/wwwroot/media/SK_Temp/18720470241_ff77768544_h.jpg b/uSync.Site/wwwroot/media/SK_Temp/18720470241_ff77768544_h.jpg new file mode 100644 index 00000000..1d7dfc1f Binary files /dev/null and b/uSync.Site/wwwroot/media/SK_Temp/18720470241_ff77768544_h.jpg differ diff --git a/uSync.Site/wwwroot/media/SK_Temp/4730684907_8a7f8759cb_b.jpg b/uSync.Site/wwwroot/media/SK_Temp/4730684907_8a7f8759cb_b.jpg new file mode 100644 index 00000000..64a6e093 Binary files /dev/null and b/uSync.Site/wwwroot/media/SK_Temp/4730684907_8a7f8759cb_b.jpg differ diff --git a/uSync.Site/wwwroot/media/SK_Temp/5852022091_87c5d045ab_b.jpg b/uSync.Site/wwwroot/media/SK_Temp/5852022091_87c5d045ab_b.jpg new file mode 100644 index 00000000..5c3ce196 Binary files /dev/null and b/uSync.Site/wwwroot/media/SK_Temp/5852022091_87c5d045ab_b.jpg differ diff --git a/uSync.Site/wwwroot/media/SK_Temp/5852022211_9028df67c0_b.jpg b/uSync.Site/wwwroot/media/SK_Temp/5852022211_9028df67c0_b.jpg new file mode 100644 index 00000000..de106026 Binary files /dev/null and b/uSync.Site/wwwroot/media/SK_Temp/5852022211_9028df67c0_b.jpg differ diff --git a/uSync.Site/wwwroot/media/SK_Temp/7371127652_e01b6ab56f_b.jpg b/uSync.Site/wwwroot/media/SK_Temp/7371127652_e01b6ab56f_b.jpg new file mode 100644 index 00000000..df40534f Binary files /dev/null and b/uSync.Site/wwwroot/media/SK_Temp/7371127652_e01b6ab56f_b.jpg differ diff --git a/uSync.Site/wwwroot/media/SK_Temp/7373036208_30257976a0_b.jpg b/uSync.Site/wwwroot/media/SK_Temp/7373036208_30257976a0_b.jpg new file mode 100644 index 00000000..3b5fde8e Binary files /dev/null and b/uSync.Site/wwwroot/media/SK_Temp/7373036208_30257976a0_b.jpg differ diff --git a/uSync.Site/wwwroot/media/SK_Temp/7373036290_5e8420bf36_b.jpg b/uSync.Site/wwwroot/media/SK_Temp/7373036290_5e8420bf36_b.jpg new file mode 100644 index 00000000..5b11ba9e Binary files /dev/null and b/uSync.Site/wwwroot/media/SK_Temp/7373036290_5e8420bf36_b.jpg differ diff --git a/uSync.Site/wwwroot/media/SK_Temp/7377957524_347859faac_b.jpg b/uSync.Site/wwwroot/media/SK_Temp/7377957524_347859faac_b.jpg new file mode 100644 index 00000000..bb279fad Binary files /dev/null and b/uSync.Site/wwwroot/media/SK_Temp/7377957524_347859faac_b.jpg differ diff --git a/uSync.Site/wwwroot/media/advbnqz1/18531852339_981b067419_h.jpg b/uSync.Site/wwwroot/media/advbnqz1/18531852339_981b067419_h.jpg new file mode 100644 index 00000000..2352503b Binary files /dev/null and b/uSync.Site/wwwroot/media/advbnqz1/18531852339_981b067419_h.jpg differ diff --git a/uSync.Site/wwwroot/media/b0adtaep/4730684907_8a7f8759cb_b.jpg b/uSync.Site/wwwroot/media/b0adtaep/4730684907_8a7f8759cb_b.jpg new file mode 100644 index 00000000..64a6e093 Binary files /dev/null and b/uSync.Site/wwwroot/media/b0adtaep/4730684907_8a7f8759cb_b.jpg differ diff --git a/uSync.Site/wwwroot/media/f0kh0rps/16403439029_f500be349b_o.jpg b/uSync.Site/wwwroot/media/f0kh0rps/16403439029_f500be349b_o.jpg new file mode 100644 index 00000000..f566630f Binary files /dev/null and b/uSync.Site/wwwroot/media/f0kh0rps/16403439029_f500be349b_o.jpg differ diff --git a/uSync.Site/wwwroot/media/huypszwn/7377957524_347859faac_b.jpg b/uSync.Site/wwwroot/media/huypszwn/7377957524_347859faac_b.jpg new file mode 100644 index 00000000..bb279fad Binary files /dev/null and b/uSync.Site/wwwroot/media/huypszwn/7377957524_347859faac_b.jpg differ diff --git a/uSync.Site/wwwroot/media/jdnh1nyd/0c2e423a2ac57204ad93c6f8a84c19e28dc1a2d9.jpg b/uSync.Site/wwwroot/media/jdnh1nyd/0c2e423a2ac57204ad93c6f8a84c19e28dc1a2d9.jpg new file mode 100644 index 00000000..517df2c8 Binary files /dev/null and b/uSync.Site/wwwroot/media/jdnh1nyd/0c2e423a2ac57204ad93c6f8a84c19e28dc1a2d9.jpg differ diff --git a/uSync.Site/wwwroot/media/jzwhnqew/7371127652_e01b6ab56f_b.jpg b/uSync.Site/wwwroot/media/jzwhnqew/7371127652_e01b6ab56f_b.jpg new file mode 100644 index 00000000..df40534f Binary files /dev/null and b/uSync.Site/wwwroot/media/jzwhnqew/7371127652_e01b6ab56f_b.jpg differ diff --git a/uSync.Site/wwwroot/media/k4jf1aiu/14272036539_469ca21d5c_h.jpg b/uSync.Site/wwwroot/media/k4jf1aiu/14272036539_469ca21d5c_h.jpg new file mode 100644 index 00000000..fd3819f2 Binary files /dev/null and b/uSync.Site/wwwroot/media/k4jf1aiu/14272036539_469ca21d5c_h.jpg differ diff --git a/uSync.Site/wwwroot/media/m5cbw5k2/18720470241_ff77768544_h.jpg b/uSync.Site/wwwroot/media/m5cbw5k2/18720470241_ff77768544_h.jpg new file mode 100644 index 00000000..1d7dfc1f Binary files /dev/null and b/uSync.Site/wwwroot/media/m5cbw5k2/18720470241_ff77768544_h.jpg differ diff --git a/uSync.Site/wwwroot/media/moepxe2a/5852022091_87c5d045ab_b.jpg b/uSync.Site/wwwroot/media/moepxe2a/5852022091_87c5d045ab_b.jpg new file mode 100644 index 00000000..5c3ce196 Binary files /dev/null and b/uSync.Site/wwwroot/media/moepxe2a/5852022091_87c5d045ab_b.jpg differ diff --git a/uSync.Site/wwwroot/media/rtio3uqc/7373036290_5e8420bf36_b.jpg b/uSync.Site/wwwroot/media/rtio3uqc/7373036290_5e8420bf36_b.jpg new file mode 100644 index 00000000..5b11ba9e Binary files /dev/null and b/uSync.Site/wwwroot/media/rtio3uqc/7373036290_5e8420bf36_b.jpg differ diff --git a/uSync.Site/wwwroot/media/si0bk4f4/18531854019_351c579559_h.jpg b/uSync.Site/wwwroot/media/si0bk4f4/18531854019_351c579559_h.jpg new file mode 100644 index 00000000..72dadd08 Binary files /dev/null and b/uSync.Site/wwwroot/media/si0bk4f4/18531854019_351c579559_h.jpg differ diff --git a/uSync.Site/wwwroot/media/xliff_translations/20200827_121524_en-US_en-US.xlf b/uSync.Site/wwwroot/media/xliff_translations/20200827_121524_en-US_en-US.xlf new file mode 100644 index 00000000..6f95d3ec --- /dev/null +++ b/uSync.Site/wwwroot/media/xliff_translations/20200827_121524_en-US_en-US.xlf @@ -0,0 +1,1250 @@ + + + + + + + + Home + + + + + + + + + Umbraco Demo + + + + + + + Moonfish, steelhead, lamprey southern flounder tadpole fish sculpin bigeye, blue-redstripe danio collared dogfish. Smalleye squaretail goldfish arowana butterflyfish pipefish wolf-herring jewel tetra, shiner; gibberfish red velvetfish. Thornyhead yellowfin pike threadsail ayu cutlassfish. + + + + + + + Check our products + + + + + + + + + Umbraco Demo + + + + + + + Curabitur arcu erat, accumsan id imperdiet et, porttitor at sem. Curabitur arcu erat, accumsan id imperdiet et, porttitor at sem. Vivamus suscipit tortor eget felis porttitor volutpat + + + + + + + Read All on the Blog + + + + + + + Umbraco HQ - Unicorn Square - Haubergsvej 1 - 5000 Odense C - Denmark - +45 70 26 11 62 + + + + + + + + + Umbraco Sample Site + + + + + + + + + + + Products + + + + + + + + + Our Gorgeous Selection + + + + + + + + + + + + + + + + + + + + People + + + + + + + + + + + + + + + + + + Nice crazy people + + + + + + + + + + + About Us + + + + + + + + + About Us + + + + + + + + Oooh la la + + + + + + + + + Vestibulum ac diam sit amet quam vehicula elementum sed sit amet dui. Curabitur aliquet quam id dui posuere blandit. Vivamus suscipit tortor eget felis porttitor volutpat. Proin eget tortor risus. Sed porttitor lectus nibh. Cras ultricies ligula sed magna dictum porta. Pellentesque in ipsum id orci porta dapibus. Pellentesque in ipsum id orci porta dapibus. Nulla porttitor accumsan tincidunt. Mauris blandit aliquet elit, eget tincidunt nibh pulvinar a. + + + + + Vestibulum ac diam sit amet quam vehicula elementum sed sit amet dui. Curabitur aliquet quam id dui posuere blandit. Vivamus suscipit tortor eget felis porttitor volutpat. Proin eget tortor risus. Sed porttitor lectus nibh. Cras ultricies ligula sed magna dictum porta. Pellentesque in ipsum id orci porta dapibus. Pellentesque in ipsum id orci porta dapibus. Nulla porttitor accumsan tincidunt. Mauris blandit aliquet elit, eget tincidunt nibh pulvinar a. + + + + + + + + + + + + + + + + + + + + + + + Blog + + + + + + + + + + + + + + + + + + Behind The Scenes + + + + + + + + + + + + + + + + + + + + Contact + + + + + + + + + + + + + + + + + + Let's have a chat + + + + + + + Send Us A Message + + + + + + + + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam eget lacinia nisl. Aenean sollicitudin diam vitae enim ultrices, semper euismod magna efficitur. + + + + + + + + + + You'll find us here + + + + + + + + + + + Tattoo + + + + + + + + + Tattoo + + + + + + + Cras ultricies ligula sed magna dictum porta. + + + + + + + UMB-TATTOO + + + + + + + + + + + Jan Skovgaard + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + About this Starter Kit + + + + + + + + + About this Starter Kit + + + + + + + + + + + + + + + + + + + + My Blog Post + + + + + + + + + + + + + + + + + + My Blog Post + + + + + + + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla quis lorem ut libero malesuada feugiat. Donec rutrum congue leo eget malesuada. Donec rutrum congue leo eget malesuada. + + + + + + + + + + Curabitur arcu erat, accumsan id imperdiet et, porttitor at sem. Donec sollicitudin molestie malesuada. Vivamus suscipit tortor eget felis porttitor volutpat. Sed porttitor lectus nibh. Vivamus magna justo, lacinia eget consectetur sed, convallis at tellus. Donec sollicitudin molestie malesuada. + + + + + Curabitur arcu erat, accumsan id imperdiet et, porttitor at sem. Donec sollicitudin molestie malesuada. Vivamus suscipit tortor eget felis porttitor volutpat. Sed porttitor lectus nibh. Vivamus magna justo, lacinia eget consectetur sed, convallis at tellus. Donec sollicitudin molestie malesuada. + + + + + Curabitur arcu erat, accumsan id imperdiet et, porttitor at sem. Donec sollicitudin molestie malesuada. Vivamus suscipit tortor eget felis porttitor volutpat. Sed porttitor lectus nibh. Vivamus magna justo, lacinia eget consectetur sed, convallis at tellus. Donec sollicitudin molestie malesuada. + + + + + + + + + + + + + + Another one + + + + + + + + + + + + + + + + + + Now it gets exciting + + + + + + + Donec sollicitudin molestie malesuada. Vivamus suscipit tortor eget felis porttitor volutpat. Sed porttitor lectus nibh. + + + + + + + + + + Donec sollicitudin molestie malesuada. Proin eget tortor risus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus magna justo, lacinia eget consectetur sed, convallis at tellus. Vivamus magna justo, lacinia eget consectetur sed, convallis at tellus. Curabitur arcu erat, accumsan id imperdiet et, porttitor at sem. Nulla porttitor accumsan tincidunt. Vivamus magna justo, lacinia eget consectetur sed, convallis at tellus. Nulla porttitor accumsan tincidunt. Donec rutrum congue leo eget malesuada. + + + + + Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Donec velit neque, auctor sit amet aliquam vel, ullamcorper sit amet ligula. Pellentesque in ipsum id orci porta dapibus. Donec rutrum congue leo eget malesuada. Nulla porttitor accumsan tincidunt. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Donec velit neque, auctor sit amet aliquam vel, ullamcorper sit amet ligula. Curabitur non nulla sit amet nisl tempus convallis quis ac lectus. Proin eget tortor risus. Pellentesque in ipsum id orci porta dapibus. Proin eget tortor risus. Sed porttitor lectus nibh. + + + + + Pellentesque in ipsum id orci porta dapibus. Curabitur aliquet quam id dui posuere blandit. Praesent sapien massa, convallis a pellentesque nec, egestas non nisi. Praesent sapien massa, convallis a pellentesque nec, egestas non nisi. Curabitur non nulla sit amet nisl tempus convallis quis ac lectus. Praesent sapien massa, convallis a pellentesque nec, egestas non nisi. Donec rutrum congue leo eget malesuada. Donec rutrum congue leo eget malesuada. Sed porttitor lectus nibh. Nulla quis lorem ut libero malesuada feugiat. + + + + + + + + + + + + + + Todo list for the Starter Kit + + + + + + + + + Things to improve + + + + + + + + + + Here's what could be improved in the Starter Kit so far: + + + + +   + + + + + For v1: + + + + + + Use a custom grid editor for testimonials + + + + + Integrated Analytics on pages + + + + + Call To Action Button in the grid (with "Tag Manager" integration) + + + + + Macro for fetching products (with friendly grid preview) + + + + + Design Review (polish) + + + + + Verify licenses of photos (Niels) + + + + + + For vNext + + + + + + + + text-decoration: line-through; + + + + Swap text with uploaded logo + + + + + + Nicer pickers of products and employees + + + + + Custom Listview for products and employees + + + + + Discus template on blog posts + + + + + 404 template + + + + + Member Login/Register/Profile/Forgot password + + + + + Update default styling of grid header + + + + + On a Blog post -&gt; Share/Social (tweet this / facebook this) + + + + + + + + + + + + + + + + + + + + + + + + Matt Brailsford + + + + + + + + + + + + + + + + + + mattbrailsford + + + + + + + + + + + + + + + + + + + + + circuitbeard + + + + + + + + + + + + + + + + + + + + Unicorn + + + + + + + + + Unicorn + + + + + + + Quisque velit nisi, pretium ut lacinia in, elementum id enim. Vivamus magna justo, lacinia eget consectetur sed, convallis at tellus. Cras ultricies ligula sed magna dictum porta. + + + + + + + UMB-UNICORN + + + + + + + + + + + Ping Pong Ball + + + + + + + + + Ping Pong Ball + + + + + + + Vivamus suscipit tortor eget felis porttitor volutpat. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Cras ultricies ligula sed magna dictum porta. + + + + + + + UMB-PINGPONG + + + + + + + + + + + Lee Kelleher + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This will be great + + + + + + + + + + + + + + + + + + This will be great + + + + + + + Proin eget tortor risus. Curabitur arcu erat, accumsan id imperdiet et, porttitor at sem. Vivamus magna justo, lacinia eget consectetur sed + + + + + + + + + + Vivamus suscipit tortor eget felis porttitor volutpat. Curabitur arcu erat, accumsan id imperdiet et, porttitor at sem. Quisque velit nisi, pretium ut lacinia in, elementum id enim. Vivamus magna justo, lacinia eget consectetur sed, convallis at tellus. Proin eget tortor risus. Curabitur arcu erat, accumsan id imperdiet et, porttitor at sem. Vivamus magna justo, lacinia eget consectetur sed, convallis at tellus. Curabitur non nulla sit amet nisl tempus convallis quis ac lectus. Donec rutrum congue leo eget malesuada. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Donec velit neque, auctor sit amet aliquam vel, ullamcorper sit amet ligula. + + + + + + + + +   + + + + + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec sollicitudin molestie malesuada. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus magna justo, lacinia eget consectetur sed, convallis at tellus. Mauris blandit aliquet elit, eget tincidunt nibh pulvinar a. Cras ultricies ligula sed magna dictum porta. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras ultricies ligula sed magna dictum porta. Pellentesque in ipsum id orci porta dapibus. + + + + + Vivamus magna justo, lacinia eget consectetur sed, convallis at tellus. Vivamus magna justo, lacinia eget consectetur sed, convallis at tellus. Nulla quis lorem ut libero malesuada feugiat. Curabitur non nulla sit amet nisl tempus convallis quis ac lectus. Sed porttitor lectus nibh. Vivamus suscipit tortor eget felis porttitor volutpat. Nulla porttitor accumsan tincidunt. Praesent sapien massa, convallis a pellentesque nec, egestas non nisi. Curabitur non nulla sit amet nisl tempus convallis quis ac lectus. Nulla porttitor accumsan tincidunt. + + + + + Vestibulum ac diam sit amet quam vehicula elementum sed sit amet dui. Vivamus suscipit tortor eget felis porttitor volutpat. Sed porttitor lectus nibh. Curabitur non nulla sit amet nisl tempus convallis quis ac lectus. Quisque velit nisi, pretium ut lacinia in, elementum id enim. Donec rutrum congue leo eget malesuada. Nulla porttitor accumsan tincidunt. Nulla quis lorem ut libero malesuada feugiat. Quisque velit nisi, pretium ut lacinia in, elementum id enim. Donec sollicitudin molestie malesuada. + + + + + Proin eget tortor risus. Donec rutrum congue leo eget malesuada. Pellentesque in ipsum id orci porta dapibus. Donec rutrum congue leo eget malesuada. Nulla quis lorem ut libero malesuada feugiat. Curabitur arcu erat, accumsan id imperdiet et, porttitor at sem. Praesent sapien massa, convallis a pellentesque nec, egestas non nisi. Praesent sapien massa, convallis a pellentesque nec, egestas non nisi. Donec sollicitudin molestie malesuada. Vivamus suscipit tortor eget felis porttitor volutpat. + + + + + + + + + + + + + + Jeavon Leopold + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Bowling Ball + + + + + + + + + Bowling Ball + + + + + + + Cras ultricies ligula sed magna dictum porta. + + + + + + + UMB-BOWLING + + + + + + + + + + + Jumpsuit + + + + + + + + + Jumpsuit + + + + + + + Proin eget tortor risus. Vestibulum ac diam sit amet quam vehicula elementum sed sit amet dui. Quisque velit nisi, pretium ut lacinia in, elementum id enim. Vivamus magna justo, lacinia eget consectetur sed, convallis at tellus. Cras ultricies ligula sed magna dictum porta. + + + + + + + UMB-JUMPSUIT + + + + + + + + + + + Jeroen Breuer + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Banjo + + + + + + + + + Banjo + + + + + + + Vivamus suscipit tortor eget felis porttitor volutpat. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Donec velit neque, auctor sit amet aliquam vel, ullamcorper sit amet ligula. Proin eget tortor risus. + + + + + + + UMB-BANJO + + + + + + + + + + + Knitted West + + + + + + + + + Knitted Unicorn West + + + + + + + Knitted Unicorn West + + + + + + + UMB-WEST + + + + + + + + + + + Biker Jacket + + + + + + + + + Biker Jacket + + + + + + + Donec rutrum congue leo eget malesuada. Vivamus suscipit tortor eget felis porttitor volutpat. + + + + + + + UMB-BIKER-JACKET + + + + + + + + + + Free shipping + + + + + Isn't that awesome - you only pay for the product + + + + + + + 1 Day return policy + + + + + You'll need to make up your mind fast + + + + + + + 100 Years warranty + + + + + But if you're satisfied it'll last a lifetime + + + + + + + \ No newline at end of file diff --git a/uSync.Site/wwwroot/media/y2vbydte/7373036208_30257976a0_b.jpg b/uSync.Site/wwwroot/media/y2vbydte/7373036208_30257976a0_b.jpg new file mode 100644 index 00000000..3b5fde8e Binary files /dev/null and b/uSync.Site/wwwroot/media/y2vbydte/7373036208_30257976a0_b.jpg differ diff --git a/uSync.Site/wwwroot/media/yjbfaoh1/5852022211_9028df67c0_b.jpg b/uSync.Site/wwwroot/media/yjbfaoh1/5852022211_9028df67c0_b.jpg new file mode 100644 index 00000000..de106026 Binary files /dev/null and b/uSync.Site/wwwroot/media/yjbfaoh1/5852022211_9028df67c0_b.jpg differ diff --git a/uSync.TemplateTracker/Properties/AssemblyInfo.cs b/uSync.TemplateTracker/Properties/AssemblyInfo.cs deleted file mode 100644 index 88d9864f..00000000 --- a/uSync.TemplateTracker/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("uSync.TemplateTracker")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("uSync.TemplateTracker")] -[assembly: AssemblyCopyright("Copyright © 2019")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("6d7486dc-0b84-4914-9c01-297467a6b706")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/uSync.TemplateTracker/TemplateTracker.cs b/uSync.TemplateTracker/TemplateTracker.cs deleted file mode 100644 index 2a632ba5..00000000 --- a/uSync.TemplateTracker/TemplateTracker.cs +++ /dev/null @@ -1,122 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; -using System.Text.RegularExpressions; -using System.Threading.Tasks; -using Umbraco.Core; -using Umbraco.Core.IO; -using Umbraco.Core.Models; -using Umbraco.Core.Services; - -namespace uSync.TemplateTracker -{ - public class TemplateTracker - { - readonly IFileService fileService; - readonly string viewFolderPath; - readonly int rootLength; - - FileSystemWatcher watcher; - - public TemplateTracker(IFileService fileService) - { - this.fileService = fileService; - rootLength = IOHelper.MapPath("~/").Length; - viewFolderPath = IOHelper.MapPath("~/views"); - } - - public void WatchViewFolder() - { - var watcher = new FileSystemWatcher(); - watcher.Path = viewFolderPath; - - watcher.NotifyFilter = NotifyFilters.LastAccess | NotifyFilters.LastWrite | NotifyFilters.FileName; - watcher.Filter = "*.cshtml"; - watcher.IncludeSubdirectories = false; - - watcher.Changed += OnChanged; - watcher.Created += OnChanged; - watcher.Deleted += OnChanged; - watcher.Renamed += OnRenamed; - - watcher.EnableRaisingEvents = true; - } - - private void OnRenamed(object sender, RenamedEventArgs e) - { - // rename, have to find the old one and change its view path, - - // then probibly track it like a normal change. - } - - private void OnChanged(object sender, FileSystemEventArgs e) - { - var templates = fileService.GetTemplates().ToList(); - UpdateTemplate(e.FullPath, templates); - } - - public void TrackChanges() - { - // var templates = entityService.GetAll(Umbraco.Core.Models.UmbracoObjectTypes.Template); - // read all teh files in the folder - - var templates = fileService.GetTemplates().ToList(); - foreach (var file in Directory.GetFiles(viewFolderPath, "*.cshtml")) - { - UpdateTemplate(file, templates); - } - } - - public void UpdateTemplate(string file, IList templates) - { - bool isChange = false; - - // get the layout line - it works out what the parent is called. - var virtualPath = file.Substring(rootLength - 1).Replace('\\', '/'); - var template = templates.FirstOrDefault(x => x.VirtualPath.InvariantEquals(virtualPath)); - var content = System.IO.File.ReadAllText(file); - - if (template == null) - { - var name = Path.GetFileNameWithoutExtension(file); - template = new Template(name, name); - } - - template.Content = content; - - var master = GetMasterFromContent(content, templates); - if (master != null) - { - if (template.MasterTemplateAlias != master.Alias) - { - template.SetMasterTemplate(master); - isChange = true; - } - } - - if (isChange) - { - fileService.SaveTemplate(template); - } - } - - - private ITemplate GetMasterFromContent(string content, IList templates) - { - var layoutRegEx = "(@{[\\s\\S]*?Layout\\s*?=\\s*?)(\"[^\"]*?\"|null)(;[\\s\\S]*?})"; - var match = Regex.Match(content, layoutRegEx); - if (match != null) - { - - var master = match.Groups[2].Value.Trim(new char[] { '"', '\\' }); - var masterPath = Path.Combine(viewFolderPath, master); - var masterVirtual = masterPath.Substring(rootLength - 1).Replace('\\', '/'); - return templates.FirstOrDefault(x => x.VirtualPath.InvariantEquals(masterVirtual)); - } - - return default; - } - } -} diff --git a/uSync.TemplateTracker/TemplateTrackerComponent.cs b/uSync.TemplateTracker/TemplateTrackerComponent.cs deleted file mode 100644 index f6977d2b..00000000 --- a/uSync.TemplateTracker/TemplateTrackerComponent.cs +++ /dev/null @@ -1,41 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Umbraco.Core; -using Umbraco.Core.Composing; - -namespace uSync.TemplateTracker -{ - public class TemplateTrackerCompose - : IUserComposer - { - public void Compose(Composition composition) - { - composition.RegisterUnique(); - composition.Components().Append(); - } - } - - public class TemplateTrackerComponent : IComponent - { - private readonly TemplateTracker tracker; - - public TemplateTrackerComponent(TemplateTracker tracker) - { - this.tracker = tracker; - } - - public void Initialize() - { - tracker.TrackChanges(); - // tracker.WatchViewFolder(); - } - - public void Terminate() - { - // do nothing. - } - } -} diff --git a/uSync.TemplateTracker/app.config b/uSync.TemplateTracker/app.config deleted file mode 100644 index e936cc13..00000000 --- a/uSync.TemplateTracker/app.config +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/uSync.TemplateTracker/packages.config b/uSync.TemplateTracker/packages.config deleted file mode 100644 index 59bc2dd3..00000000 --- a/uSync.TemplateTracker/packages.config +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/uSync.TemplateTracker/readme.md b/uSync.TemplateTracker/readme.md deleted file mode 100644 index c50e8f14..00000000 --- a/uSync.TemplateTracker/readme.md +++ /dev/null @@ -1,21 +0,0 @@ -## uSync Template Tracker (Experimental) - -Experimenting with tracking file changes in the view folder, -and automagically creating the templates in umbraco when you -create a view in visual studio. - -### Progress -- [x] find views that don't have a template in umbraco -- [x] calculate the parent from the layout attribute -- [x] create the template in the right place -- [x] check at startup -- [ ] run a filewatcher for file changes while project is running -- [ ] handle movement of templates (change the layout changes the parent) - -### Filewatcher -The file watcher stuff is potentially quite dangorous (many hanldes, lots of memeory, espeically if it ran near a live site), as such it might not be worth approaching it from this angle, a health check might be a better way to do this. - -### Notes -- this may or may not be practical. -The main issue is how filewatchers can trigger 'alot' so we will need -to keep the chatter down. diff --git a/uSync.TemplateTracker/uSync.TemplateTracker.csproj b/uSync.TemplateTracker/uSync.TemplateTracker.csproj deleted file mode 100644 index 10705032..00000000 --- a/uSync.TemplateTracker/uSync.TemplateTracker.csproj +++ /dev/null @@ -1,162 +0,0 @@ - - - - - Debug - AnyCPU - {6D7486DC-0B84-4914-9C01-297467A6B706} - Library - Properties - uSync.TemplateTracker - uSync.TemplateTracker - v4.7.2 - 512 - true - - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - ..\packages\LightInject.5.4.0\lib\net46\LightInject.dll - - - ..\packages\LightInject.Annotation.1.1.0\lib\net46\LightInject.Annotation.dll - - - ..\packages\LightInject.Web.2.0.0\lib\net46\LightInject.Web.dll - - - ..\packages\Microsoft.AspNet.Identity.Core.2.2.2\lib\net45\Microsoft.AspNet.Identity.Core.dll - - - ..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.2.0.0\lib\netstandard2.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll - - - ..\packages\Microsoft.Owin.4.0.1\lib\net45\Microsoft.Owin.dll - - - ..\packages\MiniProfiler.4.0.138\lib\net461\MiniProfiler.dll - - - ..\packages\MiniProfiler.Shared.4.0.138\lib\net461\MiniProfiler.Shared.dll - - - ..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll - - - ..\packages\NPoco.3.9.4\lib\net45\NPoco.dll - - - ..\packages\Owin.1.0\lib\net40\Owin.dll - - - ..\packages\Semver.2.0.4\lib\net452\Semver.dll - - - ..\packages\Serilog.2.8.0\lib\net46\Serilog.dll - - - ..\packages\Serilog.Enrichers.Process.2.0.1\lib\net45\Serilog.Enrichers.Process.dll - - - ..\packages\Serilog.Enrichers.Thread.3.0.0\lib\net45\Serilog.Enrichers.Thread.dll - - - ..\packages\Serilog.Filters.Expressions.2.0.0\lib\net45\Serilog.Filters.Expressions.dll - - - ..\packages\Serilog.Formatting.Compact.1.0.0\lib\net45\Serilog.Formatting.Compact.dll - - - ..\packages\Serilog.Formatting.Compact.Reader.1.0.3\lib\net45\Serilog.Formatting.Compact.Reader.dll - - - ..\packages\Serilog.Settings.AppSettings.2.2.2\lib\net45\Serilog.Settings.AppSettings.dll - - - ..\packages\Serilog.Sinks.Async.1.3.0\lib\net45\Serilog.Sinks.Async.dll - - - ..\packages\Serilog.Sinks.File.4.0.0\lib\net45\Serilog.Sinks.File.dll - - - ..\packages\Serilog.Sinks.Map.1.0.0\lib\netstandard2.0\Serilog.Sinks.Map.dll - - - ..\packages\Superpower.2.0.0\lib\net45\Superpower.dll - - - - - - - - ..\packages\Umbraco.SqlServerCE.4.0.0.1\lib\net472\System.Data.SqlServerCe.dll - - - ..\packages\Umbraco.SqlServerCE.4.0.0.1\lib\net472\System.Data.SqlServerCe.Entity.dll - - - ..\packages\System.Diagnostics.DiagnosticSource.4.4.1\lib\net46\System.Diagnostics.DiagnosticSource.dll - - - - - ..\packages\Microsoft.AspNet.WebApi.Client.5.2.7\lib\net45\System.Net.Http.Formatting.dll - - - - - - - - ..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll - - - - - - - - - - - ..\packages\UmbracoCms.Core.8.1.1\lib\net472\Umbraco.Core.dll - - - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - \ No newline at end of file diff --git a/uSync8.BackOffice/Cache/RebuildCacheComponent.cs b/uSync8.BackOffice/Cache/RebuildCacheComponent.cs deleted file mode 100644 index ddcf5aea..00000000 --- a/uSync8.BackOffice/Cache/RebuildCacheComponent.cs +++ /dev/null @@ -1,95 +0,0 @@ -using System.Linq; - -using Umbraco.Core.Composing; -using Umbraco.Core.Configuration; -using Umbraco.Core.Services.Changes; -using Umbraco.Web.Cache; -using Umbraco.Web.PublishedCache; - -using uSync8.BackOffice.Configuration; - -namespace uSync8.BackOffice.Cache -{ - [ComposeBefore(typeof(uSyncBackOfficeComposer))] - public class RebuildCacheComposer : ComponentComposer { } - - /// - /// Cache rebuilding, when imports are completed - /// - /// - /// This is off by default, the RebuildCacheOnCompletion setting is false in the - /// default config, and this probibly isn't needed past Umbraco 8.3. - /// - public class RebuildCacheComponent : IComponent - { - private readonly IPublishedSnapshotService snapshotService; - private bool rebuildCacheOnCompleaton; - - public RebuildCacheComponent(IPublishedSnapshotService snapshotService) - { - this.snapshotService = snapshotService; - uSyncConfig.Reloaded += Config_Reloaded; - } - - private void Config_Reloaded(uSyncSettings settings) - { - rebuildCacheOnCompleaton = settings.RebuildCacheOnCompletion; - } - - public void Initialize() - { - var config = Current.Configs.uSync(); - if (config != null) - Config_Reloaded(config); - - uSyncService.ImportComplete += ImportComplete; - } - - private void ImportComplete(uSyncBulkEventArgs e) - { - if (rebuildCacheOnCompleaton && - e.Actions.Any(x => x.Change > uSync8.Core.ChangeType.NoChange)) - { - // change happened. - rebuild - snapshotService.Rebuild(); - - if (UmbracoVersion.LocalVersion.Major == 8 && UmbracoVersion.LocalVersion.Minor < 4) - { - // we only do this on v8.3 and below. - - // then refresh the cache : - // there is a function for this but it is internal, so we have extracted bits. - // mimics => DistributedCache.RefreshAllPublishedSnapshot - RefreshContentCache(Umbraco.Web.Composing.Current.DistributedCache); - RefreshMediaCache(Umbraco.Web.Composing.Current.DistributedCache); - RefreshAllDomainCache(Umbraco.Web.Composing.Current.DistributedCache); - } - } - } - - - private void RefreshContentCache(DistributedCache dc) - { - var payloads = new[] { new ContentCacheRefresher.JsonPayload(0, TreeChangeTypes.RefreshAll) }; - dc.RefreshByPayload(ContentCacheRefresher.UniqueId, payloads); - } - - private void RefreshMediaCache(DistributedCache dc) - { - var payloads = new[] { new MediaCacheRefresher.JsonPayload(0, TreeChangeTypes.RefreshAll) }; - dc.RefreshByPayload(MediaCacheRefresher.UniqueId, payloads); - } - - public void RefreshAllDomainCache(DistributedCache dc) - { - var payloads = new[] { new DomainCacheRefresher.JsonPayload(0, DomainChangeTypes.RefreshAll) }; - dc.RefreshByPayload(DomainCacheRefresher.UniqueId, payloads); - } - - - public void Terminate() - { - // end. - } - } -} diff --git a/uSync8.BackOffice/Commands/Command/ExportCommand.cs b/uSync8.BackOffice/Commands/Command/ExportCommand.cs deleted file mode 100644 index c60e6de1..00000000 --- a/uSync8.BackOffice/Commands/Command/ExportCommand.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System.IO; -using System.Linq; -using System.Threading.Tasks; -using uSync8.BackOffice.SyncHandlers; - -namespace uSync8.BackOffice.Commands.Command -{ - - [SyncCommand("Export", "export", "Exports setting from Umbraco")] - public class ExportCommand : SyncCommandServiceBase, ISyncCommand - { - public ExportCommand(TextReader reader, TextWriter writer, - uSyncService uSyncService) : base(reader, writer, uSyncService) - { } - - public async Task Run(string[] args) - { - var options = ParseArguments(args); - - await writer.WriteAsync("Exporting :"); - - var handlerSet = options.GetSwitchValue("set", uSync.Handlers.DefaultSet); - - var results = uSyncService.Export(options.Folder, - new SyncHandlerOptions(handlerSet, HandlerActions.Export), - callbacks); - - await writer.WriteLineAsync($"\nExported {results.Count()} items"); - - return SyncCommandResult.Success; - } - } -} diff --git a/uSync8.BackOffice/Commands/Command/ImportCommand.cs b/uSync8.BackOffice/Commands/Command/ImportCommand.cs deleted file mode 100644 index f03ecaf3..00000000 --- a/uSync8.BackOffice/Commands/Command/ImportCommand.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using uSync8.BackOffice.SyncHandlers; -using uSync8.Core; - -namespace uSync8.BackOffice.Commands.Command -{ - [SyncCommand("Import", "import", "Imports uSync settings into Umbraco")] - public class ImportCommand : SyncCommandServiceBase, ISyncCommand - { - public ImportCommand(TextReader reader, TextWriter writer, - uSyncService uSyncService) : base(reader, writer, uSyncService) - { } - - public async Task Run(string[] args) - { - await writer.WriteAsync("Importing "); - var options = ParseArguments(args); - - var force = options.GetSwitchValue("force", false); - var handlerSet = options.GetSwitchValue("set", uSync.Handlers.DefaultSet); - - if (force) await writer.WriteAsync("(With Force) "); - - var result = uSyncService.Import(options.Folder, force, - new SyncHandlerOptions(handlerSet, HandlerActions.Import), - callbacks); - - var changeCount = result.Where(x => x.Change > ChangeType.NoChange).Count(); - - await writer.WriteAsync("\n"); - await writer.WriteLineAsync($"Imported {result.Count()} items {changeCount} changes"); - - return SyncCommandResult.Success; - } - - } -} diff --git a/uSync8.BackOffice/Commands/Command/ReportCommand.cs b/uSync8.BackOffice/Commands/Command/ReportCommand.cs deleted file mode 100644 index d94bf2ca..00000000 --- a/uSync8.BackOffice/Commands/Command/ReportCommand.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using uSync8.BackOffice.SyncHandlers; -using uSync8.Core; - -namespace uSync8.BackOffice.Commands.Command -{ - [SyncCommand("Report", "report", "Returns a list of pending changes based on the uSync folder")] - public class ReportCommand : SyncCommandServiceBase, ISyncCommand - { - public ReportCommand(TextReader reader, TextWriter writer, - uSyncService uSyncService) : base(reader, writer, uSyncService) - { } - - public async Task Run(string[] args) - { - await writer.WriteAsync("Reporting"); - - var options = ParseArguments(args); - - var handlerSet = options.GetSwitchValue("set", uSync.Handlers.DefaultSet); - - var results = uSyncService.Report(options.Folder, - new SyncHandlerOptions(handlerSet, HandlerActions.Report), - callbacks); - - await writer.WriteLineAsync($"\rReport Complete {results.Count()} items"); - - foreach (var item in results.Where(x => x.Change > ChangeType.NoChange)) - { - var changeCount = item.Details != null ? item.Details.Count() : 0; - await writer.WriteLineAsync($"{item.Change}: {item.ItemType} - {item.Name} {changeCount}"); - } - - return SyncCommandResult.Success; - } - } -} diff --git a/uSync8.BackOffice/Commands/ISyncCommand.cs b/uSync8.BackOffice/Commands/ISyncCommand.cs deleted file mode 100644 index 45c8cdbe..00000000 --- a/uSync8.BackOffice/Commands/ISyncCommand.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace uSync8.BackOffice.Commands -{ - /// - /// Implimenting ISyncCommand will make - /// your code avalilbe to the command line tool. - /// - public interface ISyncCommand - { - string Name { get; } - - string Alias { get; } - - Task Run(string[] args); - - Task ShowHelp(bool advanced); - - bool Interactive { get; set; } - } -} diff --git a/uSync8.BackOffice/Commands/SyncCommandAttribute.cs b/uSync8.BackOffice/Commands/SyncCommandAttribute.cs deleted file mode 100644 index d834d946..00000000 --- a/uSync8.BackOffice/Commands/SyncCommandAttribute.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace uSync8.BackOffice.Commands -{ - public class SyncCommandAttribute : Attribute - { - public string Name { get; set; } - public string Alias { get; set; } - public string HelpText { get; set; } - - public SyncCommandAttribute(string name, string alias, string help) - { - this.Name = name; - this.Alias = alias; - this.HelpText = help; - } - } -} diff --git a/uSync8.BackOffice/Commands/SyncCommandBase.cs b/uSync8.BackOffice/Commands/SyncCommandBase.cs deleted file mode 100644 index 7d6a9e97..00000000 --- a/uSync8.BackOffice/Commands/SyncCommandBase.cs +++ /dev/null @@ -1,101 +0,0 @@ -using System; -using System.IO; -using System.Reflection; -using System.Threading.Tasks; -using Umbraco.Core.Composing; - -using uSync8.BackOffice.Configuration; - -namespace uSync8.BackOffice.Commands -{ - public class SyncCommandBase - { - public string Name { get; protected set; } - public string Alias { get; protected set; } - public string HelpText { get; protected set; } - - public string AdvancedHelp { get; protected set; } - - public bool Interactive { get;set; } - - protected readonly TextReader reader; - protected readonly TextWriter writer; - protected readonly uSyncSettings setting; - - public SyncCommandBase(TextReader reader, TextWriter writer) - { - this.reader = reader; - this.writer = writer; - - this.setting = Current.Configs.uSync(); - - var meta = GetType().GetCustomAttribute(false); - if (meta != null) - { - this.Name = meta.Name; - this.Alias = meta.Alias; - this.HelpText = meta.HelpText; - } - } - - public virtual async Task ShowHelp(bool advanced) - { - if (!advanced) - { - await writer.WriteLineAsync($" {this.Alias,-18}{this.HelpText}"); - } - else - { - if (string.IsNullOrWhiteSpace(AdvancedHelp)) - { - await writer.WriteLineAsync("No more help availible"); - } - else - { - await writer.WriteLineAsync(AdvancedHelp); - } - // show advanced help - } - } - - protected SyncCommandOptions ParseArguments(string[] args) - { - var options = new SyncCommandOptions(setting.RootFolder); - - int position = 0; - foreach (var argument in args) - { - var cmd = argument.Trim().ToLower(); - - if (cmd.StartsWith("-")) - { - var fragments = cmd.Split('='); - - var flag = fragments[0].Substring(1); - - if (fragments.Length > 1) { - options.Switches[flag] = fragments[1]; - } - else - { - options.Switches[flag] = true; - } - } - else - { - if (position == 0) - { - options.Folder = cmd; - position++; - } - else - { - throw new ArgumentException($"{argument} not recognised"); - } - } - } - - return options; - } - } -} diff --git a/uSync8.BackOffice/Commands/SyncCommandCollection.cs b/uSync8.BackOffice/Commands/SyncCommandCollection.cs deleted file mode 100644 index 741144fa..00000000 --- a/uSync8.BackOffice/Commands/SyncCommandCollection.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; - -using Umbraco.Core.Composing; - -namespace uSync8.BackOffice.Commands -{ - public class SyncCommandCollection - : BuilderCollectionBase - { - public SyncCommandCollection(IEnumerable items) - : base(items) - { } - - public ISyncCommand GetCommand(string alias) - => this.FirstOrDefault(x => x.Alias.Equals(alias, StringComparison.InvariantCultureIgnoreCase)); - } - - public class SyncCommandCollectionBuilder - : LazyCollectionBuilderBase - { - protected override SyncCommandCollectionBuilder This => this; - } -} diff --git a/uSync8.BackOffice/Commands/SyncCommandFactory.cs b/uSync8.BackOffice/Commands/SyncCommandFactory.cs deleted file mode 100644 index 5430979d..00000000 --- a/uSync8.BackOffice/Commands/SyncCommandFactory.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace uSync8.BackOffice.Commands -{ - /// - /// Command Factory, used to get loaded commands - /// - public class SyncCommandFactory - { - private readonly SyncCommandCollection commands; - - public SyncCommandFactory(SyncCommandCollection commands) - { - this.commands = commands; - } - - /// - /// get a command based on the alias - /// - public ISyncCommand GetCommand(string alias) - => commands.GetCommand(alias); - - /// - /// get all commands - /// - public IEnumerable GetAll() - => commands; - } -} diff --git a/uSync8.BackOffice/Commands/SyncCommandOptions.cs b/uSync8.BackOffice/Commands/SyncCommandOptions.cs deleted file mode 100644 index 69cff2c4..00000000 --- a/uSync8.BackOffice/Commands/SyncCommandOptions.cs +++ /dev/null @@ -1,47 +0,0 @@ -using System.Collections.Generic; -using Umbraco.Core; - -namespace uSync8.BackOffice.Commands -{ - /// - /// command options, used when we parse the command line. - /// - /// - /// Command structure is fairly simple when we parse things - /// the first non-switched command will always be the folder, - /// the rest come from switches. - /// - /// If the switch doesn't have a value it will be set to true. - /// - /// .e.g. - /// -force => 'force', true - /// -set=mysetname => 'set', 'mysetname' - /// - public class SyncCommandOptions - { - public string Folder { get; set; } - public Dictionary Switches { get; set; } - = new Dictionary(); - - public SyncCommandOptions(string folder) - { - this.Folder = folder; - - } - - /// - /// get a switch value from the switches list, - /// - /// Defaultvalue if not set, or of expect type - public TObject GetSwitchValue(string name, TObject defaultValue) - { - if (Switches.ContainsKey(name)) - { - var result = Switches[name].TryConvertTo(); - if (result.Success) return result.Result; - } - - return defaultValue; - } - } -} diff --git a/uSync8.BackOffice/Commands/SyncCommandResult.cs b/uSync8.BackOffice/Commands/SyncCommandResult.cs deleted file mode 100644 index c573062d..00000000 --- a/uSync8.BackOffice/Commands/SyncCommandResult.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace uSync8.BackOffice.Commands -{ - public enum SyncCommandResult - { - // ok, continue - Success = 100, - NoResult = 499, - - // stop - Complete = 500, - Restart, - - // errors - stop - Error = 1000 - - } -} diff --git a/uSync8.BackOffice/Commands/SyncCommandServiceBase.cs b/uSync8.BackOffice/Commands/SyncCommandServiceBase.cs deleted file mode 100644 index c0a8d365..00000000 --- a/uSync8.BackOffice/Commands/SyncCommandServiceBase.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System.IO; - -namespace uSync8.BackOffice.Commands -{ - public class SyncCommandServiceBase : SyncCommandBase - { - protected readonly uSyncService uSyncService; - protected readonly uSyncCallbacks callbacks; - - public SyncCommandServiceBase(TextReader reader, TextWriter writer, - uSyncService uSyncService) : base(reader, writer) - { - this.uSyncService = uSyncService; - this.callbacks = new uSyncCallbacks(Summary, Update); - - AdvancedHelp = "\nOption param [folder]\tPath to the folder to use for operation\n"; - } - - // callbacks. - // We can use the callbacks that are used for SignalR with a client - // to get progress reports on any actions. - // at the base level, we just remember the current step, and - // write a '.' everytime we get something - we could go full - // progress bar UI - but that depends 'at bit' being sure you are in - // console mode and writer hasn't been pushed somewhere else. - private string currentStep = string.Empty; - - public void Summary(SyncProgressSummary summary) - { - currentStep = summary.Message; - } - - public void Update(string message, int count, int total) - { - writer.Write("."); - } - - } -} diff --git a/uSync8.BackOffice/Properties/AssemblyInfo.cs b/uSync8.BackOffice/Properties/AssemblyInfo.cs deleted file mode 100644 index c9f27f7a..00000000 --- a/uSync8.BackOffice/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("uSync8.BackOffice")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("uSync8.BackOffice")] -[assembly: AssemblyCopyright("Copyright © 2019-20")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("f2dfcb19-c9ee-471e-b8e2-e0b4dd31761d")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("8.6.6")] -[assembly: AssemblyFileVersion("8.6.6")] diff --git a/uSync8.BackOffice/Services/SyncActionService.cs b/uSync8.BackOffice/Services/SyncActionService.cs deleted file mode 100644 index 6d7fb9e7..00000000 --- a/uSync8.BackOffice/Services/SyncActionService.cs +++ /dev/null @@ -1,86 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Umbraco.Core; -using uSync8.BackOffice.Models; - -namespace uSync8.BackOffice.Services -{ - public class SyncActionService - { - private readonly SyncFileService fileService; - private readonly string actionFile; - private List actions = new List(); - - public SyncActionService(SyncFileService syncFileService, string file) - { - this.fileService = syncFileService; - this.actionFile = file; - } - - public IEnumerable GetActions() - { - this.actions = new List(); - if (fileService.FileExists(actionFile)) - this.actions = fileService.LoadXml>(actionFile); - - return this.actions; - } - - public void SaveActions() - { - if (actions.Any()) - fileService.SaveXml(actionFile, actions); - else - fileService.DeleteFile(actionFile); - } - - public void AddAction(Guid key, string alias, SyncActionType actionType) - { - if (!actions.Any(x => x.Key == key - && x.Alias == alias)) - { - actions.Add(new SyncAction() - { - Key = key, - Alias = alias, - Action = actionType - }); - } - } - - public void AddAction(Guid key, SyncActionType actionType) - { - AddAction(key, "", actionType); - } - - public void AddAction(string alias, SyncActionType actionType) - { - AddAction(Guid.NewGuid(), alias, actionType); - } - - public void RemoveActions(Guid key) - { - actions.RemoveAll(x => x.Key == key); - } - - public void RemoveActions(string alias) - { - actions.RemoveAll(x => x.Alias == alias); - } - - public void RemoveActions(Guid key, string alias) - { - actions.RemoveAll(x => x.Key == key && x.Alias == alias); - } - - public void CleanActions(Guid key,string alias) - { - RemoveActions(key); - RemoveActions(alias); - } - } - -} diff --git a/uSync8.BackOffice/SyncHandlers/SyncHandlerTreeBase.cs b/uSync8.BackOffice/SyncHandlers/SyncHandlerTreeBase.cs deleted file mode 100644 index 7a09cd6d..00000000 --- a/uSync8.BackOffice/SyncHandlers/SyncHandlerTreeBase.cs +++ /dev/null @@ -1,66 +0,0 @@ -using System; - -using Umbraco.Core.Cache; -using Umbraco.Core.Logging; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Services; - -using uSync8.BackOffice.Services; -using uSync8.Core; -using uSync8.Core.Dependency; -using uSync8.Core.Serialization; -using uSync8.Core.Tracking; - -namespace uSync8.BackOffice.SyncHandlers -{ - /// - /// handlers that have a tree - /// - /// for flat processing these need to preload all the files, to workout what order - /// they go in, but that is ok because all treeSerializers store the level in the - /// top attribute. - /// - /// - /// - public abstract class SyncHandlerTreeBase : SyncHandlerLevelBase - where TObject : ITreeEntity - where TService : IService - { - protected SyncHandlerTreeBase( - IEntityService entityService, - IProfilingLogger logger, - AppCaches appCaches, - ISyncSerializer serializer, - ISyncItemFactory syncItemFactory, - SyncFileService syncFileService) - : base(entityService, logger, appCaches, serializer, syncItemFactory, syncFileService) - { } - - [Obsolete("Use constructors with collections")] - protected SyncHandlerTreeBase( - IEntityService entityService, - IProfilingLogger logger, - ISyncSerializer serializer, - ISyncTracker tracker, - AppCaches appCaches, - SyncFileService syncFileService) - : base(entityService, logger, serializer, tracker, appCaches, syncFileService) - { } - - [Obsolete("Use constructors with collections")] - protected SyncHandlerTreeBase( - IEntityService entityService, - IProfilingLogger logger, - ISyncSerializer serializer, - ISyncTracker tracker, - AppCaches appCaches, - ISyncDependencyChecker checker, - SyncFileService syncFileService) - : base(entityService, logger, serializer, tracker, appCaches, checker, syncFileService) - { - } - - protected override string GetItemName(TObject item) => item.Name; - } - -} diff --git a/uSync8.BackOffice/app.config b/uSync8.BackOffice/app.config deleted file mode 100644 index f633b43f..00000000 --- a/uSync8.BackOffice/app.config +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/uSync8.BackOffice/packages.config b/uSync8.BackOffice/packages.config deleted file mode 100644 index 6bbd8e91..00000000 --- a/uSync8.BackOffice/packages.config +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/uSync8.BackOffice/uSync.Backoffice.Core.nuspec b/uSync8.BackOffice/uSync.Backoffice.Core.nuspec deleted file mode 100644 index 0ce248e9..00000000 --- a/uSync8.BackOffice/uSync.Backoffice.Core.nuspec +++ /dev/null @@ -1,30 +0,0 @@ - - - - uSync.BackOffice.Core - 8.0.0-alpha58 - uSync for Umbraco 8 - Kevin Jump - Jumoo - false - Just the core dll's from uSync (for extension development purposes) - - - 8.0 - Initial Release for Umbraco 8 - 8.1 - Compatability Release for Umbraco 8.1 - 8.2 - uSync Complete Companion release. - 8.3 - Language Rename support for Umbraco 8.3 - 8.4 - Dependency checking updates - 8.5 - Updates for uSync Console - - - - - - umbraco usync - - - - - - \ No newline at end of file diff --git a/uSync8.BackOffice/uSync.nuspec b/uSync8.BackOffice/uSync.nuspec deleted file mode 100644 index 0c087992..00000000 --- a/uSync8.BackOffice/uSync.nuspec +++ /dev/null @@ -1,34 +0,0 @@ - - - - uSync - 8.0.0-alpha58 - uSync for Umbraco 8 - Kevin Jump - Jumoo - false - Database syncing for Umbraco - - - - - - - - umbraco usync - - - - - - - - - - \ No newline at end of file diff --git a/uSync8.BackOffice/uSync8.BackOffice.csproj b/uSync8.BackOffice/uSync8.BackOffice.csproj deleted file mode 100644 index af2d0954..00000000 --- a/uSync8.BackOffice/uSync8.BackOffice.csproj +++ /dev/null @@ -1,364 +0,0 @@ - - - - - Debug - AnyCPU - {F2DFCB19-C9EE-471E-B8E2-E0B4DD31761D} - Library - Properties - uSync8.BackOffice - uSync8.BackOffice - v4.7.2 - 512 - true - - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - bin\PackageOnlyBuild\ - TRACE - true - pdbonly - AnyCPU - prompt - MinimumRecommendedRules.ruleset - - - - ..\packages\AutoMapper.8.0.0\lib\net461\AutoMapper.dll - - - ..\packages\ClientDependency.1.9.7\lib\net45\ClientDependency.Core.dll - - - ..\packages\ClientDependency-Mvc5.1.8.0.0\lib\net45\ClientDependency.Core.Mvc.dll - - - ..\packages\CSharpTest.Net.Collections.14.906.1403.1082\lib\net40\CSharpTest.Net.Collections.dll - - - ..\packages\Examine.1.0.0\lib\net452\Examine.dll - - - ..\packages\HtmlAgilityPack.1.8.14\lib\Net45\HtmlAgilityPack.dll - - - ..\packages\SharpZipLib.0.86.0\lib\20\ICSharpCode.SharpZipLib.dll - - - ..\packages\ImageProcessor.2.7.0.100\lib\net452\ImageProcessor.dll - - - ..\packages\LightInject.5.4.0\lib\net46\LightInject.dll - - - ..\packages\LightInject.Annotation.1.1.0\lib\net46\LightInject.Annotation.dll - - - ..\packages\LightInject.Mvc.2.0.0\lib\net46\LightInject.Mvc.dll - - - ..\packages\LightInject.Web.2.0.0\lib\net46\LightInject.Web.dll - - - ..\packages\LightInject.WebApi.2.0.0\lib\net46\LightInject.WebApi.dll - - - ..\packages\Lucene.Net.3.0.3\lib\NET40\Lucene.Net.dll - - - ..\packages\Markdown.2.2.1\lib\net451\Markdown.dll - - - ..\packages\Microsoft.AspNet.Identity.Core.2.2.2\lib\net45\Microsoft.AspNet.Identity.Core.dll - - - ..\packages\Microsoft.AspNet.Identity.Owin.2.2.2\lib\net45\Microsoft.AspNet.Identity.Owin.dll - - - ..\packages\Microsoft.AspNet.SignalR.Core.2.4.0\lib\net45\Microsoft.AspNet.SignalR.Core.dll - - - ..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.2.0.0\lib\netstandard2.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll - - - ..\packages\Microsoft.Owin.4.0.1\lib\net45\Microsoft.Owin.dll - - - ..\packages\Microsoft.Owin.Host.SystemWeb.4.0.1\lib\net45\Microsoft.Owin.Host.SystemWeb.dll - - - ..\packages\Microsoft.Owin.Security.4.0.1\lib\net45\Microsoft.Owin.Security.dll - - - ..\packages\Microsoft.Owin.Security.Cookies.4.0.1\lib\net45\Microsoft.Owin.Security.Cookies.dll - - - ..\packages\Microsoft.Owin.Security.OAuth.4.0.1\lib\net45\Microsoft.Owin.Security.OAuth.dll - - - ..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll - - - ..\packages\MiniProfiler.4.0.138\lib\net461\MiniProfiler.dll - - - ..\packages\MiniProfiler.Shared.4.0.138\lib\net461\MiniProfiler.Shared.dll - - - ..\packages\MySql.Data.6.10.7\lib\net452\MySql.Data.dll - - - ..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll - - - ..\packages\NPoco.3.9.4\lib\net45\NPoco.dll - - - ..\packages\Owin.1.0\lib\net40\Owin.dll - - - ..\packages\Semver.2.0.4\lib\net452\Semver.dll - - - ..\packages\Serilog.2.8.0\lib\net46\Serilog.dll - - - ..\packages\Serilog.Enrichers.Process.2.0.1\lib\net45\Serilog.Enrichers.Process.dll - - - ..\packages\Serilog.Enrichers.Thread.3.0.0\lib\net45\Serilog.Enrichers.Thread.dll - - - ..\packages\Serilog.Filters.Expressions.2.0.0\lib\net45\Serilog.Filters.Expressions.dll - - - ..\packages\Serilog.Formatting.Compact.1.0.0\lib\net45\Serilog.Formatting.Compact.dll - - - ..\packages\Serilog.Formatting.Compact.Reader.1.0.3\lib\net45\Serilog.Formatting.Compact.Reader.dll - - - ..\packages\Serilog.Settings.AppSettings.2.2.2\lib\net45\Serilog.Settings.AppSettings.dll - - - ..\packages\Serilog.Sinks.Async.1.3.0\lib\net45\Serilog.Sinks.Async.dll - - - ..\packages\Serilog.Sinks.File.4.0.0\lib\net45\Serilog.Sinks.File.dll - - - ..\packages\Serilog.Sinks.Map.1.0.0\lib\netstandard2.0\Serilog.Sinks.Map.dll - - - ..\packages\Superpower.2.0.0\lib\net45\Superpower.dll - - - - - - - - - - ..\packages\Umbraco.SqlServerCE.4.0.0.1\lib\net472\System.Data.SqlServerCe.dll - - - ..\packages\Umbraco.SqlServerCE.4.0.0.1\lib\net472\System.Data.SqlServerCe.Entity.dll - - - ..\packages\System.Diagnostics.DiagnosticSource.4.4.1\lib\net46\System.Diagnostics.DiagnosticSource.dll - - - - - - - - ..\packages\Microsoft.AspNet.WebApi.Client.5.2.7\lib\net45\System.Net.Http.Formatting.dll - - - - - - - - ..\packages\System.Threading.Tasks.Dataflow.4.9.0\lib\netstandard2.0\System.Threading.Tasks.Dataflow.dll - - - - ..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll - - - - - ..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.Helpers.dll - - - ..\packages\Microsoft.AspNet.WebApi.Core.5.2.7\lib\net45\System.Web.Http.dll - - - ..\packages\Microsoft.AspNet.WebApi.WebHost.5.2.7\lib\net45\System.Web.Http.WebHost.dll - - - ..\packages\Microsoft.AspNet.Mvc.5.2.7\lib\net45\System.Web.Mvc.dll - - - ..\packages\Microsoft.AspNet.Razor.3.2.7\lib\net45\System.Web.Razor.dll - - - ..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.dll - - - ..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.Deployment.dll - - - ..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.Razor.dll - - - - - - - - - ..\packages\UmbracoCms.Core.8.1.1\lib\net472\Umbraco.Core.dll - - - ..\packages\UmbracoCms.Web.8.1.1\lib\net472\Umbraco.Examine.dll - - - ..\packages\UmbracoCms.Web.8.1.1\lib\net472\Umbraco.Web.dll - - - ..\packages\UmbracoCms.Web.8.1.1\lib\net472\Umbraco.Web.UI.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {79011408-C423-479F-9B0A-8DA465DE92EB} - uSync8.Core - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - \ No newline at end of file diff --git a/uSync8.Community.Contrib/Properties/AssemblyInfo.cs b/uSync8.Community.Contrib/Properties/AssemblyInfo.cs deleted file mode 100644 index 8e4d145b..00000000 --- a/uSync8.Community.Contrib/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("uSync8.Community.Contrib")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("uSync8.Community.Contrib")] -[assembly: AssemblyCopyright("Copyright © 2019")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("0813d306-4e5a-4e9d-b8d0-3f257cae8fa2")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("8.6.0")] -[assembly: AssemblyFileVersion("8.6.0")] diff --git a/uSync8.Community.Contrib/app.config b/uSync8.Community.Contrib/app.config deleted file mode 100644 index e936cc13..00000000 --- a/uSync8.Community.Contrib/app.config +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/uSync8.Community.Contrib/packages.config b/uSync8.Community.Contrib/packages.config deleted file mode 100644 index 59bc2dd3..00000000 --- a/uSync8.Community.Contrib/packages.config +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/uSync8.Community.Contrib/uSync.Community.Contrib.nuspec b/uSync8.Community.Contrib/uSync.Community.Contrib.nuspec deleted file mode 100644 index aee9e8bc..00000000 --- a/uSync8.Community.Contrib/uSync.Community.Contrib.nuspec +++ /dev/null @@ -1,24 +0,0 @@ - - - - uSync.Community.Contrib - 8.0.0-alpha58 - uSync8 Community Contributions - Kevin Jump - Jumoo - false - Value Mapper and Serializer Contributions - - - 8.2 - DataTypeGridMapper - - - - - umbraco usync - - - - - - \ No newline at end of file diff --git a/uSync8.Community.Contrib/uSync8.Community.Contrib.csproj b/uSync8.Community.Contrib/uSync8.Community.Contrib.csproj deleted file mode 100644 index e0d75593..00000000 --- a/uSync8.Community.Contrib/uSync8.Community.Contrib.csproj +++ /dev/null @@ -1,182 +0,0 @@ - - - - - Debug - AnyCPU - {0813D306-4E5A-4E9D-B8D0-3F257CAE8FA2} - Library - Properties - uSync8.Community.Contrib - uSync8.Community.Contrib - v4.7.2 - 512 - true - - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - bin\PackageOnlyBuild\ - TRACE - true - pdbonly - AnyCPU - prompt - MinimumRecommendedRules.ruleset - - - - ..\packages\LightInject.5.4.0\lib\net46\LightInject.dll - - - ..\packages\LightInject.Annotation.1.1.0\lib\net46\LightInject.Annotation.dll - - - ..\packages\LightInject.Web.2.0.0\lib\net46\LightInject.Web.dll - - - ..\packages\Microsoft.AspNet.Identity.Core.2.2.2\lib\net45\Microsoft.AspNet.Identity.Core.dll - - - ..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.2.0.0\lib\netstandard2.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll - - - ..\packages\Microsoft.Owin.4.0.1\lib\net45\Microsoft.Owin.dll - - - ..\packages\MiniProfiler.4.0.138\lib\net461\MiniProfiler.dll - - - ..\packages\MiniProfiler.Shared.4.0.138\lib\net461\MiniProfiler.Shared.dll - - - ..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll - - - ..\packages\NPoco.3.9.4\lib\net45\NPoco.dll - - - ..\packages\Owin.1.0\lib\net40\Owin.dll - - - ..\packages\Semver.2.0.4\lib\net452\Semver.dll - - - ..\packages\Serilog.2.8.0\lib\net46\Serilog.dll - - - ..\packages\Serilog.Enrichers.Process.2.0.1\lib\net45\Serilog.Enrichers.Process.dll - - - ..\packages\Serilog.Enrichers.Thread.3.0.0\lib\net45\Serilog.Enrichers.Thread.dll - - - ..\packages\Serilog.Filters.Expressions.2.0.0\lib\net45\Serilog.Filters.Expressions.dll - - - ..\packages\Serilog.Formatting.Compact.1.0.0\lib\net45\Serilog.Formatting.Compact.dll - - - ..\packages\Serilog.Formatting.Compact.Reader.1.0.3\lib\net45\Serilog.Formatting.Compact.Reader.dll - - - ..\packages\Serilog.Settings.AppSettings.2.2.2\lib\net45\Serilog.Settings.AppSettings.dll - - - ..\packages\Serilog.Sinks.Async.1.3.0\lib\net45\Serilog.Sinks.Async.dll - - - ..\packages\Serilog.Sinks.File.4.0.0\lib\net45\Serilog.Sinks.File.dll - - - ..\packages\Serilog.Sinks.Map.1.0.0\lib\netstandard2.0\Serilog.Sinks.Map.dll - - - ..\packages\Superpower.2.0.0\lib\net45\Superpower.dll - - - - - - - - ..\packages\Umbraco.SqlServerCE.4.0.0.1\lib\net472\System.Data.SqlServerCe.dll - - - ..\packages\Umbraco.SqlServerCE.4.0.0.1\lib\net472\System.Data.SqlServerCe.Entity.dll - - - ..\packages\System.Diagnostics.DiagnosticSource.4.4.1\lib\net46\System.Diagnostics.DiagnosticSource.dll - - - - - ..\packages\Microsoft.AspNet.WebApi.Client.5.2.7\lib\net45\System.Net.Http.Formatting.dll - - - - - - - - ..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll - - - - - - - - - - - ..\packages\UmbracoCms.Core.8.1.1\lib\net472\Umbraco.Core.dll - - - - - - - - - - - - - - - - {875ECD47-2DCE-475A-BDDD-3B578A832419} - uSync8.ContentEdition - - - {79011408-C423-479F-9B0A-8DA465DE92EB} - uSync8.Core - - - - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - \ No newline at end of file diff --git a/uSync8.Community.Contrib/uSyncContrib.cs b/uSync8.Community.Contrib/uSyncContrib.cs deleted file mode 100644 index 13751749..00000000 --- a/uSync8.Community.Contrib/uSyncContrib.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace uSync8.Community.Contrib -{ - public class uSyncContrib - { - } -} diff --git a/uSync8.Community.DataTypeSerializers/CoreTypes/ContentPickerConfigSerializer.cs b/uSync8.Community.DataTypeSerializers/CoreTypes/ContentPickerConfigSerializer.cs deleted file mode 100644 index be63b1df..00000000 --- a/uSync8.Community.DataTypeSerializers/CoreTypes/ContentPickerConfigSerializer.cs +++ /dev/null @@ -1,63 +0,0 @@ -using System; - -using Newtonsoft.Json; - -using Umbraco.Core.Services; -using Umbraco.Web.PropertyEditors; - -using uSync8.Core.DataTypes; - -namespace uSync8.Community.DataTypeSerializers.CoreTypes -{ - public class ContentPickerConfigSerializer : SyncDataTypeSerializerBase, IConfigurationSerializer - { - public ContentPickerConfigSerializer(IEntityService entityService) - : base(entityService) - { } - - public string Name => "ContentPickerNodeSerializer"; - - public string[] Editors => new string[] { "Umbraco.ContentPicker" }; - - public override string SerializeConfig(object configuration) - { - - if (configuration is ContentPickerConfiguration pickerConfig) - { - var contentPickerConfig = new MappedPathConfigBase(); - - contentPickerConfig.Config = new ContentPickerConfiguration() - { - IgnoreUserStartNodes = pickerConfig.IgnoreUserStartNodes, - StartNodeId = null, - ShowOpenButton = pickerConfig.ShowOpenButton - }; - - if (pickerConfig.StartNodeId != null) - contentPickerConfig.MappedPath = UdiToEntityPath(pickerConfig.StartNodeId); - - return base.SerializeConfig(contentPickerConfig); - } - - return base.SerializeConfig(configuration); - } - - - public override object DeserializeConfig(string config, Type configType) - { - if (configType == typeof(ContentPickerConfiguration)) - { - var mappedConfig = JsonConvert.DeserializeObject>(config); - - if (!string.IsNullOrWhiteSpace(mappedConfig.MappedPath)) - { - mappedConfig.Config.StartNodeId = PathToUdi(mappedConfig.MappedPath); - } - - return mappedConfig.Config; - } - - return base.DeserializeConfig(config, configType); - } - } -} diff --git a/uSync8.Community.DataTypeSerializers/CoreTypes/MNTPickerConfigSerializer.cs b/uSync8.Community.DataTypeSerializers/CoreTypes/MNTPickerConfigSerializer.cs deleted file mode 100644 index 21df546a..00000000 --- a/uSync8.Community.DataTypeSerializers/CoreTypes/MNTPickerConfigSerializer.cs +++ /dev/null @@ -1,73 +0,0 @@ -using System; - -using Newtonsoft.Json; - -using Umbraco.Core.Services; -using Umbraco.Web.PropertyEditors; - -using uSync8.Core.DataTypes; - -namespace uSync8.Community.DataTypeSerializers.CoreTypes -{ - public class MNTPickerConfigSerializer : SyncDataTypeSerializerBase, IConfigurationSerializer - { - public MNTPickerConfigSerializer(IEntityService entityService) - : base(entityService) - { } - - public string Name => "MNTPNodeSerializer"; - - public string[] Editors => new string[] { "Umbraco.MultiNodeTreePicker" }; - - public override string SerializeConfig(object configuration) - { - var MNTPMappedConfig = new MappedPathConfigBase(); - - if (configuration is MultiNodePickerConfiguration pickerConfig) - { - MNTPMappedConfig.Config = new MultiNodePickerConfiguration() - { - IgnoreUserStartNodes = pickerConfig.IgnoreUserStartNodes, - Filter = pickerConfig.Filter, - MaxNumber = pickerConfig.MaxNumber, - MinNumber = pickerConfig.MinNumber, - ShowOpen = pickerConfig.ShowOpen, - TreeSource = new MultiNodePickerConfigurationTreeSource() - { - ObjectType = pickerConfig.TreeSource.ObjectType, - StartNodeId = pickerConfig.TreeSource.StartNodeId, - StartNodeQuery = pickerConfig.TreeSource.StartNodeQuery - } - - }; - - if (pickerConfig?.TreeSource?.StartNodeId != null) - { - MNTPMappedConfig.MappedPath = UdiToEntityPath(pickerConfig.TreeSource.StartNodeId); - } - - return base.SerializeConfig(MNTPMappedConfig); - } - - return base.SerializeConfig(configuration); - } - - - public override object DeserializeConfig(string config, Type configType) - { - if (configType == typeof(MultiNodePickerConfiguration)) - { - var mappedConfig = JsonConvert.DeserializeObject>(config); - - if (!string.IsNullOrWhiteSpace(mappedConfig.MappedPath)) - { - mappedConfig.Config.TreeSource.StartNodeId = PathToUdi(mappedConfig.MappedPath); - } - - return mappedConfig.Config; - } - - return base.DeserializeConfig(config, configType); - } - } -} diff --git a/uSync8.Community.DataTypeSerializers/CoreTypes/MediaPickerConfigSerializer.cs b/uSync8.Community.DataTypeSerializers/CoreTypes/MediaPickerConfigSerializer.cs deleted file mode 100644 index 4612dc60..00000000 --- a/uSync8.Community.DataTypeSerializers/CoreTypes/MediaPickerConfigSerializer.cs +++ /dev/null @@ -1,64 +0,0 @@ -using System; - -using Newtonsoft.Json; - -using Umbraco.Core.Services; -using Umbraco.Web.PropertyEditors; - -using uSync8.Core.DataTypes; - -namespace uSync8.Community.DataTypeSerializers.CoreTypes -{ - public class MediaPickerConfigSerializer : SyncDataTypeSerializerBase, IConfigurationSerializer - { - public MediaPickerConfigSerializer(IEntityService entityService) - : base(entityService) - { } - - public string Name => "MediaPickerNodeSerializer"; - - public string[] Editors => new string[] { "Umbraco.MediaPicker" }; - - public override string SerializeConfig(object configuration) - { - - if (configuration is MediaPickerConfiguration pickerConfig) - { - var mediaPickerConfig = new MappedPathConfigBase(); - mediaPickerConfig.Config = new MediaPickerConfiguration() - { - DisableFolderSelect = pickerConfig.DisableFolderSelect, - IgnoreUserStartNodes = pickerConfig.IgnoreUserStartNodes, - Multiple = pickerConfig.Multiple, - OnlyImages = pickerConfig.OnlyImages, - StartNodeId = null - }; - - if (pickerConfig.StartNodeId != null) - mediaPickerConfig.MappedPath = UdiToEntityPath(pickerConfig.StartNodeId); - return base.SerializeConfig(mediaPickerConfig); - } - - return base.SerializeConfig(configuration); - - } - - - public override object DeserializeConfig(string config, Type configType) - { - if (configType == typeof(MediaPickerConfiguration)) - { - var mappedConfig = JsonConvert.DeserializeObject>(config); - - if (!string.IsNullOrWhiteSpace(mappedConfig.MappedPath)) - { - mappedConfig.Config.StartNodeId = PathToUdi(mappedConfig.MappedPath); - } - - return mappedConfig.Config; - } - - return base.DeserializeConfig(config, configType); - } - } -} diff --git a/uSync8.Community.DataTypeSerializers/Properties/AssemblyInfo.cs b/uSync8.Community.DataTypeSerializers/Properties/AssemblyInfo.cs deleted file mode 100644 index 3e53ceb2..00000000 --- a/uSync8.Community.DataTypeSerializers/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("uSync8.Community.DataTypeSerializers")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("uSync8.Community.DataTypeSerializers")] -[assembly: AssemblyCopyright("Copyright © 2019")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("a0b9c603-a7dc-4593-8059-19ba035e5cc3")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("8.5.0.1")] -[assembly: AssemblyFileVersion("8.5.0.1")] diff --git a/uSync8.Community.DataTypeSerializers/SyncDataTypeSerializerBase.cs b/uSync8.Community.DataTypeSerializers/SyncDataTypeSerializerBase.cs deleted file mode 100644 index 7d718e3e..00000000 --- a/uSync8.Community.DataTypeSerializers/SyncDataTypeSerializerBase.cs +++ /dev/null @@ -1,99 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Umbraco.Core; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Services; -using uSync8.Core.DataTypes; -using static Umbraco.Core.Constants; - -namespace uSync8.Community.DataTypeSerializers -{ - public abstract class SyncDataTypeSerializerBase : ConfigurationSerializerBase - { - protected readonly IEntityService entityService; - - public SyncDataTypeSerializerBase(IEntityService entityService) - { - this.entityService = entityService; - } - - protected virtual string UdiToEntityPath(Udi udi) - { - if (udi is GuidUdi guidUdi) - { - var item = entityService.Get(guidUdi.Guid); - var type = Umbraco.Core.Models.ObjectTypes.GetUdiType(item.NodeObjectType); - - if (item != null) - return type + ":" + GetItemPath(item); - - } - return string.Empty; - } - - protected virtual string GetItemPath(IEntitySlim item) - { - var path = ""; - if (item.ParentId != -1) - { - var parent = entityService.Get(item.ParentId); - if (parent != null) - path += GetItemPath(parent); - } - - return path + "/" + item.Name; - } - - protected virtual Udi PathToUdi(string entityPath) - { - if (entityPath.IndexOf(':') == -1) return null; - - var entityType = entityPath.Substring(0, entityPath.IndexOf(':')); - var objectType = UdiEntityType.ToUmbracoObjectType(entityType); - - var names = entityPath.Substring(entityPath.IndexOf(':') + 1).ToDelimitedList("/"); - - int parentId = -1; - - IEntitySlim next = null; - - foreach(var name in names) - { - next = FindItem(parentId, name, objectType); - if (next == null) return null; - - parentId = next.Id; - } - - if (next != null) - return Udi.Create(entityType, next.Key); - - - return null; - } - - protected IEntitySlim FindItem(int parentId, string name, UmbracoObjectTypes objectType) - { - var children = entityService.GetChildren(parentId, objectType); - if (children.Any()) - { - return children.FirstOrDefault(x => x.Name.InvariantEquals(name)); - } - - return null; - } - - } - - public class MappedPathConfigBase - { - public TObject Config { get; set; } - - public string MappedPath { get; set; } - } - -} diff --git a/uSync8.Community.DataTypeSerializers/app.config b/uSync8.Community.DataTypeSerializers/app.config deleted file mode 100644 index 430296ee..00000000 --- a/uSync8.Community.DataTypeSerializers/app.config +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/uSync8.Community.DataTypeSerializers/packages.config b/uSync8.Community.DataTypeSerializers/packages.config deleted file mode 100644 index d0e084e0..00000000 --- a/uSync8.Community.DataTypeSerializers/packages.config +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/uSync8.Community.DataTypeSerializers/uSync.Community.DataTypeSerializers.nuspec b/uSync8.Community.DataTypeSerializers/uSync.Community.DataTypeSerializers.nuspec deleted file mode 100644 index 6f296b04..00000000 --- a/uSync8.Community.DataTypeSerializers/uSync.Community.DataTypeSerializers.nuspec +++ /dev/null @@ -1,30 +0,0 @@ - - - - uSync.Community.DataTypeSerializers - 8.0.0-alpha58 - uSync8 Community DataType Serializers - Kevin Jump - Jumoo - false - Mappers for Datatypes that store content or media values - - - - - 8.2 - Core Mappers (ContentPicker, MediaPicker, MNTP Picker) - - - - - umbraco usync - - - - - - \ No newline at end of file diff --git a/uSync8.Community.DataTypeSerializers/uSync8.Community.DataTypeSerializers.csproj b/uSync8.Community.DataTypeSerializers/uSync8.Community.DataTypeSerializers.csproj deleted file mode 100644 index ef73e676..00000000 --- a/uSync8.Community.DataTypeSerializers/uSync8.Community.DataTypeSerializers.csproj +++ /dev/null @@ -1,276 +0,0 @@ - - - - - Debug - AnyCPU - {A0B9C603-A7DC-4593-8059-19BA035E5CC3} - Library - Properties - uSync8.Community.DataTypeSerializers - uSync8.Community.DataTypeSerializers - v4.7.2 - 512 - true - - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - bin\PackageOnlyBuild\ - TRACE - true - pdbonly - AnyCPU - prompt - MinimumRecommendedRules.ruleset - - - - ..\packages\AutoMapper.8.0.0\lib\net461\AutoMapper.dll - - - ..\packages\ClientDependency.1.9.7\lib\net45\ClientDependency.Core.dll - - - ..\packages\ClientDependency-Mvc5.1.8.0.0\lib\net45\ClientDependency.Core.Mvc.dll - - - ..\packages\CSharpTest.Net.Collections.14.906.1403.1082\lib\net40\CSharpTest.Net.Collections.dll - - - ..\packages\Examine.1.0.0\lib\net452\Examine.dll - - - ..\packages\HtmlAgilityPack.1.8.14\lib\Net45\HtmlAgilityPack.dll - - - ..\packages\SharpZipLib.0.86.0\lib\20\ICSharpCode.SharpZipLib.dll - - - ..\packages\ImageProcessor.2.7.0.100\lib\net452\ImageProcessor.dll - - - ..\packages\LightInject.5.4.0\lib\net46\LightInject.dll - - - ..\packages\LightInject.Annotation.1.1.0\lib\net46\LightInject.Annotation.dll - - - ..\packages\LightInject.Mvc.2.0.0\lib\net46\LightInject.Mvc.dll - - - ..\packages\LightInject.Web.2.0.0\lib\net46\LightInject.Web.dll - - - ..\packages\LightInject.WebApi.2.0.0\lib\net46\LightInject.WebApi.dll - - - ..\packages\Lucene.Net.3.0.3\lib\NET40\Lucene.Net.dll - - - ..\packages\Markdown.2.2.1\lib\net451\Markdown.dll - - - ..\packages\Microsoft.AspNet.Identity.Core.2.2.2\lib\net45\Microsoft.AspNet.Identity.Core.dll - - - ..\packages\Microsoft.AspNet.Identity.Owin.2.2.2\lib\net45\Microsoft.AspNet.Identity.Owin.dll - - - ..\packages\Microsoft.AspNet.SignalR.Core.2.4.0\lib\net45\Microsoft.AspNet.SignalR.Core.dll - - - ..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.2.0.0\lib\netstandard2.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll - - - ..\packages\Microsoft.Owin.4.0.1\lib\net45\Microsoft.Owin.dll - - - ..\packages\Microsoft.Owin.Host.SystemWeb.4.0.1\lib\net45\Microsoft.Owin.Host.SystemWeb.dll - - - ..\packages\Microsoft.Owin.Security.4.0.1\lib\net45\Microsoft.Owin.Security.dll - - - ..\packages\Microsoft.Owin.Security.Cookies.4.0.1\lib\net45\Microsoft.Owin.Security.Cookies.dll - - - ..\packages\Microsoft.Owin.Security.OAuth.4.0.1\lib\net45\Microsoft.Owin.Security.OAuth.dll - - - ..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll - - - ..\packages\MiniProfiler.4.0.138\lib\net461\MiniProfiler.dll - - - ..\packages\MiniProfiler.Shared.4.0.138\lib\net461\MiniProfiler.Shared.dll - - - ..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll - - - ..\packages\NPoco.3.9.4\lib\net45\NPoco.dll - - - ..\packages\Owin.1.0\lib\net40\Owin.dll - - - ..\packages\Semver.2.0.4\lib\net452\Semver.dll - - - ..\packages\Serilog.2.8.0\lib\net46\Serilog.dll - - - ..\packages\Serilog.Enrichers.Process.2.0.1\lib\net45\Serilog.Enrichers.Process.dll - - - ..\packages\Serilog.Enrichers.Thread.3.0.0\lib\net45\Serilog.Enrichers.Thread.dll - - - ..\packages\Serilog.Filters.Expressions.2.0.0\lib\net45\Serilog.Filters.Expressions.dll - - - ..\packages\Serilog.Formatting.Compact.1.0.0\lib\net45\Serilog.Formatting.Compact.dll - - - ..\packages\Serilog.Formatting.Compact.Reader.1.0.3\lib\net45\Serilog.Formatting.Compact.Reader.dll - - - ..\packages\Serilog.Settings.AppSettings.2.2.2\lib\net45\Serilog.Settings.AppSettings.dll - - - ..\packages\Serilog.Sinks.Async.1.3.0\lib\net45\Serilog.Sinks.Async.dll - - - ..\packages\Serilog.Sinks.File.4.0.0\lib\net45\Serilog.Sinks.File.dll - - - ..\packages\Serilog.Sinks.Map.1.0.0\lib\netstandard2.0\Serilog.Sinks.Map.dll - - - ..\packages\Superpower.2.0.0\lib\net45\Superpower.dll - - - - - - - - ..\packages\Umbraco.SqlServerCE.4.0.0.1\lib\net472\System.Data.SqlServerCe.dll - - - ..\packages\Umbraco.SqlServerCE.4.0.0.1\lib\net472\System.Data.SqlServerCe.Entity.dll - - - ..\packages\System.Diagnostics.DiagnosticSource.4.4.1\lib\net46\System.Diagnostics.DiagnosticSource.dll - - - - - ..\packages\Microsoft.AspNet.WebApi.Client.5.2.7\lib\net45\System.Net.Http.Formatting.dll - - - - - - - - ..\packages\System.Threading.Tasks.Dataflow.4.9.0\lib\netstandard2.0\System.Threading.Tasks.Dataflow.dll - - - - ..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll - - - - - ..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.Helpers.dll - - - ..\packages\Microsoft.AspNet.WebApi.Core.5.2.7\lib\net45\System.Web.Http.dll - - - ..\packages\Microsoft.AspNet.WebApi.WebHost.5.2.7\lib\net45\System.Web.Http.WebHost.dll - - - ..\packages\Microsoft.AspNet.Mvc.5.2.7\lib\net45\System.Web.Mvc.dll - - - ..\packages\Microsoft.AspNet.Razor.3.2.7\lib\net45\System.Web.Razor.dll - - - ..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.dll - - - ..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.Deployment.dll - - - ..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.Razor.dll - - - - - - - - - ..\packages\UmbracoCms.Core.8.1.1\lib\net472\Umbraco.Core.dll - - - ..\packages\UmbracoCms.Web.8.1.1\lib\net472\Umbraco.Examine.dll - - - ..\packages\UmbracoCms.Web.8.1.1\lib\net472\Umbraco.Web.dll - - - ..\packages\UmbracoCms.Web.8.1.1\lib\net472\Umbraco.Web.UI.dll - - - - - - - - - - - - {79011408-c423-479f-9b0a-8da465de92eb} - uSync8.Core - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - \ No newline at end of file diff --git a/uSync8.ContentEdition/Checkers/ContentBaseChecker.cs b/uSync8.ContentEdition/Checkers/ContentBaseChecker.cs deleted file mode 100644 index 1fdb25b2..00000000 --- a/uSync8.ContentEdition/Checkers/ContentBaseChecker.cs +++ /dev/null @@ -1,201 +0,0 @@ -using System.Collections.Generic; -using System.Linq; - -using Serilog.Core; - -using Umbraco.Core; -using Umbraco.Core.Models; -using Umbraco.Core.Services; - -using uSync8.ContentEdition.Mapping; -using uSync8.Core.Dependency; -using static Umbraco.Core.Constants; - -namespace uSync8.ContentEdition.Checkers -{ - public abstract class ContentBaseChecker - { - protected readonly IEntityService entityService; - private UmbracoObjectTypes contentTypeObjectType; - private SyncValueMapperCollection mapperCollection; - - public UmbracoObjectTypes ObjectType { get; protected set; } = UmbracoObjectTypes.Unknown; - - public ContentBaseChecker(IEntityService entityService, - UmbracoObjectTypes contentTypeObjectType, - SyncValueMapperCollection mappers) - { - this.entityService = entityService; - this.contentTypeObjectType = contentTypeObjectType; - - this.mapperCollection = mappers; - } - - protected uSyncDependency CalcDocTypeDependency(IContentBase item, DependencyFlags flags) - { - if (item.ContentType == null) return null; - - - var entity = entityService.GetKey(item.ContentTypeId, contentTypeObjectType); - - if (entity.Success) - { - var udi = Udi.Create(contentTypeObjectType.GetUdiType(), entity.Result); - - return new uSyncDependency() - { - Name = item.Name, - Udi = udi, - Order = DependencyOrders.ContentTypes, - Flags = flags & ~DependencyFlags.IncludeAncestors, - Level = item.Level - }; - } - - return null; - } - - protected IEnumerable GetParentDependencies(string path, int order, DependencyFlags flags) - { - var ids = path.Split(new char[] { ',' }, System.StringSplitOptions.RemoveEmptyEntries) - .Select(x => int.Parse(x)) - .ToArray(); - - var items = entityService.GetAll(this.ObjectType, ids); - foreach(var item in items) - { - order--; - yield return new uSyncDependency - { - Name = item.Name, - Udi = Udi.Create(this.ObjectType.GetUdiType(), item.Key), - Order = order, - Flags = flags & ~DependencyFlags.IncludeChildren, - Level = item.Level - }; - } - } - - protected IEnumerable GetParentDependencies(int id, int order, DependencyFlags flags) - { - var dependencies = new List(); - - var parent = entityService.GetParent(id); - if (parent != null) - { - dependencies.Add(new uSyncDependency() - { - Name = parent.Name, - Udi = Udi.Create(this.ObjectType.GetUdiType(), parent.Key), - Order = order, - Flags = flags & ~DependencyFlags.IncludeChildren, - Level = parent.Level - }); - - dependencies.AddRange(GetParentDependencies(parent.Id, order - 1, flags)); - } - - return dependencies; - } - - protected IEnumerable GetChildDepencies(int id, int order, DependencyFlags flags, int min, int max) - { - var children = entityService.GetChildren(id).ToList(); - if (children.Count == 0) return Enumerable.Empty(); - - var dependencies = new List(); - - var step = (max - min) / children.Count; - - foreach (var item in children.Select((Child, Index) => new { Child, Index })) - { - var stepCount = min + item.Index * step; - - uSyncDependency.FireUpdate($"Child Content : {item.Child.Name}", stepCount, uSyncContent.DependencyCountMax); - - dependencies.Add(new uSyncDependency() - { - Name = item.Child.Name, - Udi = Udi.Create(this.ObjectType.GetUdiType(), item.Child.Key), - Order = order, - Flags = flags & ~DependencyFlags.IncludeAncestors, - Level = item.Child.Level - }); - - if (flags.HasFlagAny(DependencyFlags.IncludeLinked | DependencyFlags.IncludeMedia)) - { - var contentChild = GetItemById(item.Child.Id); - dependencies.AddRange(GetPropertyDependencies(contentChild, flags)); - } - - dependencies.AddRange(GetChildDepencies(item.Child.Id, order + 1, flags, stepCount, stepCount + step)); - } - - return dependencies; - } - - protected abstract IContentBase GetItemById(int id); - - - protected readonly string[] settingsTypes = new string[] - { - UdiEntityType.Macro, UdiEntityType.DocumentType, UdiEntityType.DataType, UdiEntityType.DictionaryItem - }; - - /// - /// so do we want this ? go through all the picked values in the content, - /// and include them in the things to export ? - /// - /// - /// - protected IEnumerable GetPropertyDependencies(IContentBase item, DependencyFlags flags) - { - var dependencies = new List(); - - var propertyFlags = flags - & ~DependencyFlags.IncludeChildren; - - foreach (var property in item.Properties) - { - var editorAlias = property.PropertyType.PropertyEditorAlias; - var valueMappers = mapperCollection.GetSyncMappers(editorAlias); - if (valueMappers.Any()) - { - foreach(var value in property.Values) - { - if (value.EditedValue == null) continue; - - foreach (var mapper in valueMappers) - { - var linkedDependencies = mapper.GetDependencies(value.EditedValue, editorAlias, propertyFlags); - - // include linked means all content we link to - if (flags.HasFlag(DependencyFlags.IncludeLinked)) - { - dependencies.AddRange(linkedDependencies.Where(x => x.Udi.EntityType == UdiEntityType.Document)); - } - - // include any settings things we would be dependent on for this property. - if (flags.HasFlag(DependencyFlags.IncludeDependencies)) - { - dependencies.AddRange(linkedDependencies.Where(x => settingsTypes.InvariantContains(x.Udi.EntityType))); - } - - // media means we include media items (the files are checked) - if (flags.HasFlag(DependencyFlags.IncludeMedia)) - { - var media = linkedDependencies.Where(x => x.Udi.EntityType == UdiEntityType.Media || x.Udi.EntityType == UdiEntityType.MediaFile).ToList(); - media.ForEach(x => { x.Flags |= DependencyFlags.IncludeAncestors; }); - - dependencies.AddRange(media); - } - } - } - } - } - - return dependencies; - } - - } -} diff --git a/uSync8.ContentEdition/Checkers/ContentChecker.cs b/uSync8.ContentEdition/Checkers/ContentChecker.cs deleted file mode 100644 index a098895c..00000000 --- a/uSync8.ContentEdition/Checkers/ContentChecker.cs +++ /dev/null @@ -1,73 +0,0 @@ -using System.Collections.Generic; - -using Umbraco.Core; -using Umbraco.Core.Models; -using Umbraco.Core.Services; - -using uSync8.ContentEdition.Mapping; -using uSync8.Core.Dependency; - -namespace uSync8.ContentEdition.Checkers -{ - public class ContentChecker : ContentBaseChecker, ISyncDependencyChecker - { - private readonly IContentService contentService; - - public ContentChecker(IEntityService entityService, - IContentService contentService, - SyncValueMapperCollection mappers) - : base(entityService, UmbracoObjectTypes.DocumentType, mappers) - { - this.contentService = contentService; - - ObjectType = UmbracoObjectTypes.Document; - } - - public IEnumerable GetDependencies(IContent item, DependencyFlags flags) - { - uSyncDependency.FireUpdate(item.Name); - - var dependencies = new List(); - - dependencies.Add(new uSyncDependency() - { - Name = item.Name, - Udi = item.GetUdi(), - Order = DependencyOrders.Content, - Flags = flags, - Level = item.Level - }); - - if (flags.HasFlag(DependencyFlags.IncludeDependencies)) - { - var contentType = CalcDocTypeDependency(item, flags); - if (contentType != null) - dependencies.Add(contentType); - } - - // if we are getting linked items or media, include in the look up. - if (flags.HasFlagAny(DependencyFlags.IncludeLinked | DependencyFlags.IncludeMedia | DependencyFlags.IncludeDependencies)) - { - uSyncDependency.FireUpdate($"{item.Name} Property Dependencies"); - dependencies.AddRange(GetPropertyDependencies(item, flags)); - } - - if (flags.HasFlag(DependencyFlags.IncludeAncestors)) - { - uSyncDependency.FireUpdate($"{item.Name} Ancestors"); - dependencies.AddRange(GetParentDependencies(item.Id, DependencyOrders.Content - 1, flags)); - } - - if (flags.HasFlag(DependencyFlags.IncludeChildren)) - { - uSyncDependency.FireUpdate($"{item.Name} Children"); - dependencies.AddRange(GetChildDepencies(item.Id, DependencyOrders.Content + 1, flags, 1, uSyncContent.DependencyCountMax)); - } - - return dependencies; - } - - protected override IContentBase GetItemById(int id) - => contentService.GetById(id); - } -} diff --git a/uSync8.ContentEdition/Checkers/DictionaryItemChecker.cs b/uSync8.ContentEdition/Checkers/DictionaryItemChecker.cs deleted file mode 100644 index d432f598..00000000 --- a/uSync8.ContentEdition/Checkers/DictionaryItemChecker.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Umbraco.Core; -using Umbraco.Core.Models; -using uSync8.Core.Dependency; - -namespace uSync8.ContentEdition.Checkers -{ - public class DictionaryItemChecker : ISyncDependencyChecker - { - public UmbracoObjectTypes ObjectType => UmbracoObjectTypes.Unknown; - - // public UmbracoObjectTypes ObjectType => UmbracoObjectTypes.DictionaryItem - - - public IEnumerable GetDependencies(IDictionaryItem item, DependencyFlags flags) - { - uSyncDependency.FireUpdate(item.ItemKey); - - var dependencies = new List(); - dependencies.Add(new uSyncDependency() - { - Name = item.ItemKey, - Order = DependencyOrders.DictionaryItems, - Udi = item.GetUdi(), - Flags = flags, - Level = 0 - }); - - return dependencies; - } - } -} diff --git a/uSync8.ContentEdition/Checkers/DomainChecker.cs b/uSync8.ContentEdition/Checkers/DomainChecker.cs deleted file mode 100644 index 3ca46589..00000000 --- a/uSync8.ContentEdition/Checkers/DomainChecker.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Umbraco.Core; -using Umbraco.Core.Models; -using uSync8.Core.Dependency; - -namespace uSync8.ContentEdition.Checkers -{ - public class DomainChecker : ISyncDependencyChecker - { - public UmbracoObjectTypes ObjectType => UmbracoObjectTypes.Unknown; - - public IEnumerable GetDependencies(IDomain item, DependencyFlags flags) - { - uSyncDependency.FireUpdate(item.DomainName); - - var dependencies = new List(); - dependencies.Add(new uSyncDependency() - { - Name = item.DomainName, - Order = DependencyOrders.Domain, - Udi = new GuidUdi("domain", item.Key), - Flags = flags, - Level = 0 - }); - - return dependencies; - } - } -} diff --git a/uSync8.ContentEdition/Checkers/MediaChecker.cs b/uSync8.ContentEdition/Checkers/MediaChecker.cs deleted file mode 100644 index cffd0463..00000000 --- a/uSync8.ContentEdition/Checkers/MediaChecker.cs +++ /dev/null @@ -1,65 +0,0 @@ -using System.Collections.Generic; - -using Umbraco.Core; -using Umbraco.Core.Models; -using Umbraco.Core.Services; - -using uSync8.ContentEdition.Mapping; -using uSync8.Core.Dependency; - -namespace uSync8.ContentEdition.Checkers -{ - public class MediaChecker : ContentBaseChecker, ISyncDependencyChecker - { - private readonly IMediaService mediaService; - - public MediaChecker(IEntityService entityService, - IMediaService mediaService, - SyncValueMapperCollection mappers) - : base(entityService, UmbracoObjectTypes.MediaType, mappers) - { - this.mediaService = mediaService; - - ObjectType = UmbracoObjectTypes.Media; - } - - public IEnumerable GetDependencies(IMedia item, DependencyFlags flags) - { - uSyncDependency.FireUpdate(item.Name); - - var dependencies = new List(); - - dependencies.Add(new uSyncDependency() - { - Name = item.Name, - Udi = item.GetUdi(), - Order = DependencyOrders.Media, - Flags = flags, - Level = item.Level - }); - - if (flags.HasFlag(DependencyFlags.IncludeDependencies)) - { - var contentType = CalcDocTypeDependency(item, flags); - if (contentType != null) - dependencies.Add(contentType); - } - - if (flags.HasFlag(DependencyFlags.IncludeAncestors)) - { - // dependencies.AddRange(GetParentDependencies(item.Id, DependencyOrders.Media - 1, flags)); - dependencies.AddRange(GetParentDependencies(item.Path, DependencyOrders.Media - 1, flags)); - } - - if (flags.HasFlag(DependencyFlags.IncludeChildren)) - { - dependencies.AddRange(GetChildDepencies(item.Id, DependencyOrders.Media + 1 , flags, 1, uSyncContent.DependencyCountMax)); - } - - return dependencies; - } - - protected override IContentBase GetItemById(int id) - => mediaService.GetById(id); - } -} diff --git a/uSync8.ContentEdition/Checkers/RelationTypeChecker.cs b/uSync8.ContentEdition/Checkers/RelationTypeChecker.cs deleted file mode 100644 index 39b07267..00000000 --- a/uSync8.ContentEdition/Checkers/RelationTypeChecker.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System.Collections.Generic; - -using Umbraco.Core; -using Umbraco.Core.Models; - -using uSync8.Core.Dependency; - -namespace uSync.ContentEdition.Checkers -{ - public class RelationTypeChecker : ISyncDependencyChecker - { - public UmbracoObjectTypes ObjectType => UmbracoObjectTypes.RelationType; - - public IEnumerable GetDependencies(IRelationType item, DependencyFlags flags) - { - return new uSyncDependency - { - Name = item.Name, - Udi = item.GetUdi(), - Order = DependencyOrders.RelationTypes, - Flags = flags - }.AsEnumerableOfOne(); - } - } -} diff --git a/uSync8.ContentEdition/Mapping/SyncValueMapperFactory.cs b/uSync8.ContentEdition/Mapping/SyncValueMapperFactory.cs deleted file mode 100644 index 418e94f0..00000000 --- a/uSync8.ContentEdition/Mapping/SyncValueMapperFactory.cs +++ /dev/null @@ -1,61 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; - -using Umbraco.Core; -using Umbraco.Core.Composing; - -using uSync8.Core.Dependency; - -namespace uSync8.ContentEdition.Mapping -{ - public static class SyncValueMapperFactory - { - [Obsolete("Request all mappers and you can chain multiple mappers")] - public static ISyncMapper GetMapper(string editorAlias) - { - return Current - .Factory - .GetInstance() - .GetSyncMapper(editorAlias); - } - - public static IEnumerable GetMappers(string editorAlias) - { - return Current - .Factory - .GetInstance() - .GetSyncMappers(editorAlias); - } - - public static string GetExportValue(object value, string editorAlias) - { - return Current - .Factory - .GetInstance() - .GetExportValue(value, editorAlias); - } - - public static object GetImportValue(string value, string editorAlias) - { - return Current - .Factory - .GetInstance() - .GetImportValue(value, editorAlias); - } - - public static IEnumerable GetDependencies(object value, string editorAlias, DependencyFlags flags) - { - var mappers = GetMappers(editorAlias); - if (!mappers.Any()) return Enumerable.Empty(); - - var dependencies = new List(); - foreach(var mapper in mappers) - { - dependencies.AddRange(mapper.GetDependencies(value, editorAlias, flags)); - } - return dependencies; - } - } - -} diff --git a/uSync8.ContentEdition/Properties/AssemblyInfo.cs b/uSync8.ContentEdition/Properties/AssemblyInfo.cs deleted file mode 100644 index 6863dd9c..00000000 --- a/uSync8.ContentEdition/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("uSync8.ContentEdition")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("uSync8.ContentEdition")] -[assembly: AssemblyCopyright("Copyright © 2019-20")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("875ecd47-2dce-475a-bddd-3b578a832419")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("8.6.6")] -[assembly: AssemblyFileVersion("8.6.6")] diff --git a/uSync8.ContentEdition/app.config b/uSync8.ContentEdition/app.config deleted file mode 100644 index 8b096745..00000000 --- a/uSync8.ContentEdition/app.config +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/uSync8.ContentEdition/packages.config b/uSync8.ContentEdition/packages.config deleted file mode 100644 index d0e084e0..00000000 --- a/uSync8.ContentEdition/packages.config +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/uSync8.ContentEdition/uSync.ContentEdition.Core.nuspec b/uSync8.ContentEdition/uSync.ContentEdition.Core.nuspec deleted file mode 100644 index 1303d368..00000000 --- a/uSync8.ContentEdition/uSync.ContentEdition.Core.nuspec +++ /dev/null @@ -1,28 +0,0 @@ - - - - uSync.ContentEdition.Core - 8.0.0-alpha58 - uSync for Umbraco 8 - Kevin Jump - Jumoo - false - Just the core dll's from uSync ContentEdition (for extension development purposes) - - - 8.0 - Initial Release for Umbraco 8 - 8.1 - Compatability Release for Umbraco 8.1 - 8.2 - Expansions Release - - - - - - - umbraco usync - - - - - - \ No newline at end of file diff --git a/uSync8.ContentEdition/uSync.ContentEdition.nuspec b/uSync8.ContentEdition/uSync.ContentEdition.nuspec deleted file mode 100644 index 34342cc4..00000000 --- a/uSync8.ContentEdition/uSync.ContentEdition.nuspec +++ /dev/null @@ -1,29 +0,0 @@ - - - - uSync.ContentEdition - 8.0.0-alpha58 - uSync Content Edition for Umbraco 8 - Kevin Jump - Jumoo - false - Database syncing for Umbraco Content, Media and Dictionary Items - - - 8.0 - Initial Release for Umbraco 8 - 8.1 - Compatability Release for Umbraco 8.1 - 8.4 - One way dictionary Items, Content Creation Date in file - 8.5 - Path and Level updates, lookup caching - - - - - - umbraco usync - - - - - - - \ No newline at end of file diff --git a/uSync8.ContentEdition/uSync8.ContentEdition.csproj b/uSync8.ContentEdition/uSync8.ContentEdition.csproj deleted file mode 100644 index 54edc0fb..00000000 --- a/uSync8.ContentEdition/uSync8.ContentEdition.csproj +++ /dev/null @@ -1,321 +0,0 @@ - - - - - Debug - AnyCPU - {875ECD47-2DCE-475A-BDDD-3B578A832419} - Library - Properties - uSync8.ContentEdition - uSync8.ContentEdition - v4.7.2 - 512 - true - - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - bin\PackageOnlyBuild\ - TRACE - true - pdbonly - AnyCPU - prompt - MinimumRecommendedRules.ruleset - - - - ..\packages\AutoMapper.8.0.0\lib\net461\AutoMapper.dll - - - ..\packages\ClientDependency.1.9.7\lib\net45\ClientDependency.Core.dll - - - ..\packages\ClientDependency-Mvc5.1.8.0.0\lib\net45\ClientDependency.Core.Mvc.dll - - - ..\packages\CSharpTest.Net.Collections.14.906.1403.1082\lib\net40\CSharpTest.Net.Collections.dll - - - ..\packages\Examine.1.0.0\lib\net452\Examine.dll - - - ..\packages\HtmlAgilityPack.1.8.14\lib\Net45\HtmlAgilityPack.dll - - - ..\packages\SharpZipLib.0.86.0\lib\20\ICSharpCode.SharpZipLib.dll - - - ..\packages\ImageProcessor.2.7.0.100\lib\net452\ImageProcessor.dll - - - ..\packages\LightInject.5.4.0\lib\net46\LightInject.dll - - - ..\packages\LightInject.Annotation.1.1.0\lib\net46\LightInject.Annotation.dll - - - ..\packages\LightInject.Mvc.2.0.0\lib\net46\LightInject.Mvc.dll - - - ..\packages\LightInject.Web.2.0.0\lib\net46\LightInject.Web.dll - - - ..\packages\LightInject.WebApi.2.0.0\lib\net46\LightInject.WebApi.dll - - - ..\packages\Lucene.Net.3.0.3\lib\NET40\Lucene.Net.dll - - - ..\packages\Markdown.2.2.1\lib\net451\Markdown.dll - - - ..\packages\Microsoft.AspNet.Identity.Core.2.2.2\lib\net45\Microsoft.AspNet.Identity.Core.dll - - - ..\packages\Microsoft.AspNet.Identity.Owin.2.2.2\lib\net45\Microsoft.AspNet.Identity.Owin.dll - - - ..\packages\Microsoft.AspNet.SignalR.Core.2.4.0\lib\net45\Microsoft.AspNet.SignalR.Core.dll - - - ..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.2.0.0\lib\netstandard2.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll - - - ..\packages\Microsoft.Owin.4.0.1\lib\net45\Microsoft.Owin.dll - - - ..\packages\Microsoft.Owin.Host.SystemWeb.4.0.1\lib\net45\Microsoft.Owin.Host.SystemWeb.dll - - - ..\packages\Microsoft.Owin.Security.4.0.1\lib\net45\Microsoft.Owin.Security.dll - - - ..\packages\Microsoft.Owin.Security.Cookies.4.0.1\lib\net45\Microsoft.Owin.Security.Cookies.dll - - - ..\packages\Microsoft.Owin.Security.OAuth.4.0.1\lib\net45\Microsoft.Owin.Security.OAuth.dll - - - ..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll - - - ..\packages\MiniProfiler.4.0.138\lib\net461\MiniProfiler.dll - - - ..\packages\MiniProfiler.Shared.4.0.138\lib\net461\MiniProfiler.Shared.dll - - - ..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll - - - ..\packages\NPoco.3.9.4\lib\net45\NPoco.dll - - - ..\packages\Owin.1.0\lib\net40\Owin.dll - - - ..\packages\Semver.2.0.4\lib\net452\Semver.dll - - - ..\packages\Serilog.2.8.0\lib\net46\Serilog.dll - - - ..\packages\Serilog.Enrichers.Process.2.0.1\lib\net45\Serilog.Enrichers.Process.dll - - - ..\packages\Serilog.Enrichers.Thread.3.0.0\lib\net45\Serilog.Enrichers.Thread.dll - - - ..\packages\Serilog.Filters.Expressions.2.0.0\lib\net45\Serilog.Filters.Expressions.dll - - - ..\packages\Serilog.Formatting.Compact.1.0.0\lib\net45\Serilog.Formatting.Compact.dll - - - ..\packages\Serilog.Formatting.Compact.Reader.1.0.3\lib\net45\Serilog.Formatting.Compact.Reader.dll - - - ..\packages\Serilog.Settings.AppSettings.2.2.2\lib\net45\Serilog.Settings.AppSettings.dll - - - ..\packages\Serilog.Sinks.Async.1.3.0\lib\net45\Serilog.Sinks.Async.dll - - - ..\packages\Serilog.Sinks.File.4.0.0\lib\net45\Serilog.Sinks.File.dll - - - ..\packages\Serilog.Sinks.Map.1.0.0\lib\netstandard2.0\Serilog.Sinks.Map.dll - - - ..\packages\Superpower.2.0.0\lib\net45\Superpower.dll - - - - - - - - ..\packages\Umbraco.SqlServerCE.4.0.0.1\lib\net472\System.Data.SqlServerCe.dll - - - ..\packages\Umbraco.SqlServerCE.4.0.0.1\lib\net472\System.Data.SqlServerCe.Entity.dll - - - ..\packages\System.Diagnostics.DiagnosticSource.4.4.1\lib\net46\System.Diagnostics.DiagnosticSource.dll - - - - - ..\packages\Microsoft.AspNet.WebApi.Client.5.2.7\lib\net45\System.Net.Http.Formatting.dll - - - - - - - - ..\packages\System.Threading.Tasks.Dataflow.4.9.0\lib\netstandard2.0\System.Threading.Tasks.Dataflow.dll - - - - ..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll - - - - - ..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.Helpers.dll - - - ..\packages\Microsoft.AspNet.WebApi.Core.5.2.7\lib\net45\System.Web.Http.dll - - - ..\packages\Microsoft.AspNet.WebApi.WebHost.5.2.7\lib\net45\System.Web.Http.WebHost.dll - - - ..\packages\Microsoft.AspNet.Mvc.5.2.7\lib\net45\System.Web.Mvc.dll - - - ..\packages\Microsoft.AspNet.Razor.3.2.7\lib\net45\System.Web.Razor.dll - - - ..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.dll - - - ..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.Deployment.dll - - - ..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.Razor.dll - - - - - - - - - ..\packages\UmbracoCms.Core.8.1.1\lib\net472\Umbraco.Core.dll - - - ..\packages\UmbracoCms.Web.8.1.1\lib\net472\Umbraco.Examine.dll - - - ..\packages\UmbracoCms.Web.8.1.1\lib\net472\Umbraco.Web.dll - - - ..\packages\UmbracoCms.Web.8.1.1\lib\net472\Umbraco.Web.UI.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {f2dfcb19-c9ee-471e-b8e2-e0b4dd31761d} - uSync8.BackOffice - - - {79011408-c423-479f-9b0a-8da465de92eb} - uSync8.Core - - - - - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - \ No newline at end of file diff --git a/uSync8.Core/Dependency/Checkers/ContentTypeBaseChecker.cs b/uSync8.Core/Dependency/Checkers/ContentTypeBaseChecker.cs deleted file mode 100644 index 2fd65fb7..00000000 --- a/uSync8.Core/Dependency/Checkers/ContentTypeBaseChecker.cs +++ /dev/null @@ -1,152 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Umbraco.Core; -using Umbraco.Core.Models; -using Umbraco.Core.Services; -using static Umbraco.Core.Constants; - -namespace uSync8.Core.Dependency -{ - public class ContentTypeBaseChecker - where TObject : IContentTypeComposition - { - - private readonly IEntityService entityService; - private readonly IDataTypeService dataTypeService; - private readonly ILocalizationService localizationService; - - public virtual UmbracoObjectTypes ObjectType { get; } - - public ContentTypeBaseChecker( - IEntityService entityService, - IDataTypeService dataTypeService, - ILocalizationService localizationService) - { - this.entityService = entityService; - this.dataTypeService = dataTypeService; - this.localizationService = localizationService; - } - - protected IEnumerable CalcDataTypeDependencies(TObject item, DependencyFlags flags) - { - var dataTypes = new List(); - - var dictionaryKeys = new List(); - - foreach(var property in item.PropertyTypes) - { - var dataType = dataTypeService.GetDataType(property.DataTypeId); - if (dataType != null) - { - dataTypes.Add(new uSyncDependency() - { - Name = dataType.Name, - Udi = dataType.GetUdi(), - Order = DependencyOrders.DataTypes, - Flags = flags, - Level = item.Level - }); - } - - // TODO: Dictionary Item Dependencies, when labels start with # - if (property.Name.StartsWith("#")) - { - dictionaryKeys.Add(property.Name.Substring(1)); - } - } - - foreach(var tab in item.PropertyGroups) - { - if (tab.Name.StartsWith("#")) - dictionaryKeys.Add(tab.Name.Substring(1)); - } - - dataTypes.AddRange(GetDictionaryDependencies(dictionaryKeys, flags)); - - return dataTypes; - } - - private IEnumerable GetDictionaryDependencies(IEnumerable keys, DependencyFlags flags) - { - var dependencies = new List(); - - foreach(var key in keys) - { - var item = localizationService.GetDictionaryItemByKey(key); - if (item != null) - { - - dependencies.Add(new uSyncDependency() - { - Name = item.ItemKey, - Flags = flags, - Order = DependencyOrders.DictionaryItems, - Level = 0, - Udi = item.GetUdi() // strong chance you can't do this with a dictionary item :( - }); - } - } - - return dependencies; - } - - protected IEnumerable CalcCompositions(IContentTypeComposition item, int priority, DependencyFlags flags) - { - var contentTypes = new List(); - - foreach (var composition in item.ContentTypeComposition) - { - contentTypes.Add(new uSyncDependency() - { - Name = item.Name, - Udi = composition.GetUdi(), - Order = priority, - Level = composition.Level, - Flags = flags - }); - - if (composition.ContentTypeComposition != null && composition.ContentTypeComposition.Any()) - { - contentTypes.AddRange(CalcCompositions(composition, priority - 1, flags)); - } - } - - return contentTypes; - } - - - - protected IEnumerable CalcChildren(int itemId, DependencyFlags flags) - { - var childItems = new List(); - - if (flags.HasFlag(DependencyFlags.IncludeChildren)) - { - var children = entityService.GetDescendants(itemId, this.ObjectType); - - if (children != null && children.Any()) - { - foreach (var child in children.OrderBy(x => x.Level)) - { - if (child != null) - { - childItems.Add(new uSyncDependency() - { - Name = child.Name, - Udi = Udi.Create(UdiEntityType.FromUmbracoObjectType(this.ObjectType), child.Key), - Flags = flags & ~DependencyFlags.IncludeAncestors, - Level = child.Level, - Order = DependencyOrders.ContentTypes + child.Level - }); - } - } - } - } - - return childItems; - } - } -} diff --git a/uSync8.Core/Dependency/Checkers/ContentTypeChecker.cs b/uSync8.Core/Dependency/Checkers/ContentTypeChecker.cs deleted file mode 100644 index 8f58dc62..00000000 --- a/uSync8.Core/Dependency/Checkers/ContentTypeChecker.cs +++ /dev/null @@ -1,78 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; - -using Umbraco.Core; -using Umbraco.Core.Models; -using Umbraco.Core.Services; -using static Umbraco.Core.Constants; - -namespace uSync8.Core.Dependency -{ - public class ContentTypeChecker : - ContentTypeBaseChecker, - ISyncDependencyChecker - { - - public override UmbracoObjectTypes ObjectType => UmbracoObjectTypes.DocumentType; - - public ContentTypeChecker(IDataTypeService dataTypeService, ILocalizationService localizationService, IEntityService entityService) - : base(entityService, dataTypeService, localizationService) - { - } - - - public IEnumerable GetDependencies(IContentType item, DependencyFlags flags) - { - uSyncDependency.FireUpdate(item.Name, 1, 1); - - var dependentflags = flags & ~DependencyFlags.IncludeChildren; - - var dependencies = new List(); - - dependencies.Add(new uSyncDependency() - { - Name = item.Name, - Udi = item.GetUdi(), - Order = DependencyOrders.ContentTypes, - Flags = dependentflags, - Level = item.Level - }); - - - if (flags.HasFlag(DependencyFlags.IncludeDependencies)) { - dependencies.AddRange(CalcDataTypeDependencies(item, dependentflags)); ; - dependencies.AddRange(CalcCompositions(item, DependencyOrders.ContentTypes - 1, dependentflags)); - dependencies.AddRange(CalcTemplateDependencies(item, dependentflags)); - } - - dependencies.AddRange(CalcChildren(item.Id, flags)); - - return dependencies; - } - - - private IEnumerable CalcTemplateDependencies(IContentType item, DependencyFlags flags) - { - var templates = new List(); - - if (flags.HasFlag(DependencyFlags.IncludeViews)) - { - foreach (var template in item.AllowedTemplates) - { - templates.Add(new uSyncDependency() - { - Name = item.Name, - Udi = template.GetUdi(), - Order = DependencyOrders.Templates, - Flags = flags, - Level = template.Path.ToDelimitedList().Count() - }); - } - } - - return templates; - } - - } -} diff --git a/uSync8.Core/Dependency/Checkers/DataTypeChecker.cs b/uSync8.Core/Dependency/Checkers/DataTypeChecker.cs deleted file mode 100644 index 5d912a65..00000000 --- a/uSync8.Core/Dependency/Checkers/DataTypeChecker.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Umbraco.Core; -using Umbraco.Core.Models; - -namespace uSync8.Core.Dependency -{ - public class DataTypeChecker : ISyncDependencyChecker - { - public UmbracoObjectTypes ObjectType => UmbracoObjectTypes.DataType; - - public IEnumerable GetDependencies(IDataType item, DependencyFlags flags) - { - uSyncDependency.FireUpdate(item.Name, 1, 1); - - var dependencies = new List(); - dependencies.Add(new uSyncDependency() - { - Name = item.Name, - Order = DependencyOrders.DataTypes, - Udi = item.GetUdi(), - Flags = flags, - Level = item.Level - }); - - // what can datatypes depend on? - - return dependencies; - } - - } -} diff --git a/uSync8.Core/Dependency/Checkers/LanguageChecker.cs b/uSync8.Core/Dependency/Checkers/LanguageChecker.cs deleted file mode 100644 index 4dbc6446..00000000 --- a/uSync8.Core/Dependency/Checkers/LanguageChecker.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Umbraco.Core; -using Umbraco.Core.Models; - -namespace uSync8.Core.Dependency -{ - public class LanguageChecker : ISyncDependencyChecker - { - public UmbracoObjectTypes ObjectType => UmbracoObjectTypes.Language; - - public IEnumerable GetDependencies(ILanguage item, DependencyFlags flags) - { - var dependencies = new List - { - new uSyncDependency() - { - Name= item.CultureName, - Udi = item.GetUdi(), - Order = DependencyOrders.Languages, - Flags = flags, - Level = 0 - } - }; - - return dependencies; - - } - } -} diff --git a/uSync8.Core/Dependency/Checkers/MacroChecker.cs b/uSync8.Core/Dependency/Checkers/MacroChecker.cs deleted file mode 100644 index 4614640c..00000000 --- a/uSync8.Core/Dependency/Checkers/MacroChecker.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Umbraco.Core; -using Umbraco.Core.Models; - -namespace uSync8.Core.Dependency -{ - public class MacroChecker : ISyncDependencyChecker - { - public UmbracoObjectTypes ObjectType => UmbracoObjectTypes.Unknown; - - public IEnumerable GetDependencies(IMacro item, DependencyFlags flags) - { - var dependencies = new List - { - new uSyncDependency() - { - Name = item.Name, - Udi = item.GetUdi(), - Order = DependencyOrders.Macros, - Flags = flags - - } - }; - - return dependencies; - } - } -} diff --git a/uSync8.Core/Dependency/Checkers/MediaTypeChecker.cs b/uSync8.Core/Dependency/Checkers/MediaTypeChecker.cs deleted file mode 100644 index 3d2981bb..00000000 --- a/uSync8.Core/Dependency/Checkers/MediaTypeChecker.cs +++ /dev/null @@ -1,51 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Umbraco.Core; -using Umbraco.Core.Models; -using Umbraco.Core.Services; - -namespace uSync8.Core.Dependency -{ - public class MediaTypeChecker : - ContentTypeBaseChecker, - ISyncDependencyChecker - { - public MediaTypeChecker( - IEntityService entityService, - IDataTypeService dataTypeService, - ILocalizationService localizationService) - : base(entityService, dataTypeService, localizationService) - { } - - public override UmbracoObjectTypes ObjectType => UmbracoObjectTypes.MediaType; - - public IEnumerable GetDependencies(IMediaType item, DependencyFlags flags) - { - var dependencies = new List(); - - var dependentFlags = flags & ~DependencyFlags.IncludeChildren; - - dependencies.Add(new uSyncDependency() - { - Name = item.Name, - Udi = item.GetUdi(), - Order = DependencyOrders.MediaTypes, - Flags = flags, - Level = item.Level - }); - - if (flags.HasFlag(DependencyFlags.IncludeDependencies)) - { - dependencies.AddRange(CalcDataTypeDependencies(item, dependentFlags)); - dependencies.AddRange(CalcCompositions(item, DependencyOrders.MediaTypes - 1, dependentFlags)); - } - - dependencies.AddRange(CalcChildren(item.Id, flags)); - - return dependencies; - } - } -} diff --git a/uSync8.Core/Dependency/Checkers/MemberTypeChecker.cs b/uSync8.Core/Dependency/Checkers/MemberTypeChecker.cs deleted file mode 100644 index 720421cf..00000000 --- a/uSync8.Core/Dependency/Checkers/MemberTypeChecker.cs +++ /dev/null @@ -1,51 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Umbraco.Core; -using Umbraco.Core.Models; -using Umbraco.Core.Services; - -namespace uSync8.Core.Dependency -{ - public class MemberTypeChecker : ContentTypeBaseChecker, - ISyncDependencyChecker - { - public MemberTypeChecker( - IEntityService entityService, - IDataTypeService dataTypeService, ILocalizationService localizationService) - : base(entityService, dataTypeService, localizationService) - { - } - - public override UmbracoObjectTypes ObjectType => UmbracoObjectTypes.MemberType; - - public IEnumerable GetDependencies(IMemberType item, DependencyFlags flags) - { - var dependencies = new List(); - - var dependentFlags = flags & ~DependencyFlags.IncludeChildren; - - - dependencies.Add(new uSyncDependency() - { - Name = item.Name, - Udi = item.GetUdi(), - Order = DependencyOrders.MemberTypes, - Flags = flags, - Level = item.Level - }); - - if (flags.HasFlag(DependencyFlags.IncludeDependencies)) - { - dependencies.AddRange(CalcDataTypeDependencies(item, dependentFlags)); - dependencies.AddRange(CalcCompositions(item, DependencyOrders.MemberTypes - 1, dependentFlags)); - } - - dependencies.AddRange(CalcChildren(item.Id, flags)); - - return dependencies; - } - } -} diff --git a/uSync8.Core/Dependency/Checkers/TemplateChecker.cs b/uSync8.Core/Dependency/Checkers/TemplateChecker.cs deleted file mode 100644 index 9c51b074..00000000 --- a/uSync8.Core/Dependency/Checkers/TemplateChecker.cs +++ /dev/null @@ -1,129 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Text.RegularExpressions; -using System.Threading.Tasks; - -using Umbraco.Core; -using Umbraco.Core.Models; -using Umbraco.Core.Services; - -namespace uSync8.Core.Dependency -{ - public class TemplateChecker : ISyncDependencyChecker - { - private IFileService fileService; - - public TemplateChecker(IFileService fileService) - { - this.fileService = fileService; - } - - public UmbracoObjectTypes ObjectType => UmbracoObjectTypes.Template; - - public IEnumerable GetDependencies(ITemplate item, DependencyFlags flags) - { - var dependencies = new List(); - - // only get teh dependencies for templates if the flag is set. - if (!flags.HasFlag(DependencyFlags.IncludeViews)) return dependencies; - - dependencies.Add(new uSyncDependency() - { - Name = item.Name, - Order = DependencyOrders.Templates, - Udi = item.GetUdi(), - Flags = flags, - Level = CalculateLevel(item) - }); - - // always get the parents of a template?? - - // if (flags.HasFlag(DependencyFlags.IncludeAncestors)) - // { - dependencies.AddRange(GetParents(item, DependencyOrders.Templates - 1, flags)); - // } - - if (flags.HasFlag(DependencyFlags.IncludeChildren)) - { - // children check. - dependencies.AddRange(GetChildren(item, DependencyOrders.Templates + 1, flags)); - } - - return dependencies; - } - - private IEnumerable GetParents(ITemplate item, int order, DependencyFlags flags) - { - var templates = new List(); - - if (!string.IsNullOrWhiteSpace(item.MasterTemplateAlias)) - { - var master = fileService.GetTemplate(item.MasterTemplateAlias); - if (master != null) - { - templates.Add(new uSyncDependency() - { - Name = item.Name, - Order = order, - Udi = master.GetUdi(), - Level = CalculateLevel(master), - Flags = flags & ~DependencyFlags.IncludeAncestors - }); - - templates.AddRange(GetParents(master, order - 1, flags)); - } - } - - return templates; - } - - private IEnumerable GetChildren(ITemplate item, int order, DependencyFlags flags) - { - var templates = new List(); - - var children = fileService.GetTemplateChildren(item.Id); - if (children != null && children.Any()) - { - foreach(var child in children) - { - templates.Add(new uSyncDependency() - { - Name = item.Name, - Order = order, - Udi = child.GetUdi(), - Flags = flags & ~DependencyFlags.IncludeAncestors, - Level = CalculateLevel(child) - }); - - GetChildren(child, order + 1, flags); - } - } - - return templates; - } - - private int CalculateLevel(ITemplate item) - { - return item.Path.ToDelimitedList().Count(); - - /* - if (item.MasterTemplateAlias.IsNullOrWhiteSpace()) return 1; - - int level = 1; - var current = item; - while (!string.IsNullOrWhiteSpace(current.MasterTemplateAlias) && level < 20) - { - level++; - var parent = fileService.GetTemplate(current.MasterTemplateAlias); - if (parent == null) return level; - - current = parent; - } - - return level; - */ - } - } -} diff --git a/uSync8.Core/Properties/AssemblyInfo.cs b/uSync8.Core/Properties/AssemblyInfo.cs deleted file mode 100644 index deeae77d..00000000 --- a/uSync8.Core/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("uSync8.Core")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Jumoo")] -[assembly: AssemblyProduct("uSync8.Core")] -[assembly: AssemblyCopyright("Copyright © 2019-20")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("79011408-c423-479f-9b0a-8da465de92eb")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("8.6.6")] -[assembly: AssemblyFileVersion("8.6.6")] diff --git a/uSync8.Core/app.config b/uSync8.Core/app.config deleted file mode 100644 index e936cc13..00000000 --- a/uSync8.Core/app.config +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/uSync8.Core/packages.config b/uSync8.Core/packages.config deleted file mode 100644 index 31a38553..00000000 --- a/uSync8.Core/packages.config +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/uSync8.Core/uSync.Core.nuspec b/uSync8.Core/uSync.Core.nuspec deleted file mode 100644 index 38d00815..00000000 --- a/uSync8.Core/uSync.Core.nuspec +++ /dev/null @@ -1,26 +0,0 @@ - - - - uSync.Core - 8.0.0-alpha58 - uSync Core for Umbraco 8 - Kevin Jump - Jumoo - false - Database syncing for Umbraco 8 - Core Dll's for uSync 8 - - - umbraco usync - - - - - - diff --git a/uSync8.Core/uSync8.Core.csproj b/uSync8.Core/uSync8.Core.csproj deleted file mode 100644 index c7215d55..00000000 --- a/uSync8.Core/uSync8.Core.csproj +++ /dev/null @@ -1,239 +0,0 @@ - - - - - Debug - AnyCPU - {79011408-C423-479F-9B0A-8DA465DE92EB} - Library - Properties - uSync8.Core - uSync8.Core - v4.7.2 - 512 - true - - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - bin\PackageOnlyBuild\ - TRACE - true - pdbonly - AnyCPU - prompt - MinimumRecommendedRules.ruleset - - - - ..\packages\AutoMapper.8.0.0\lib\net461\AutoMapper.dll - - - ..\packages\LightInject.5.4.0\lib\net46\LightInject.dll - - - ..\packages\LightInject.Annotation.1.1.0\lib\net46\LightInject.Annotation.dll - - - ..\packages\LightInject.Web.2.0.0\lib\net46\LightInject.Web.dll - - - ..\packages\Microsoft.AspNet.Identity.Core.2.2.2\lib\net45\Microsoft.AspNet.Identity.Core.dll - - - ..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.2.0.0\lib\netstandard2.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll - - - ..\packages\Microsoft.Owin.4.0.1\lib\net45\Microsoft.Owin.dll - - - ..\packages\MiniProfiler.4.0.138\lib\net461\MiniProfiler.dll - - - ..\packages\MiniProfiler.Shared.4.0.138\lib\net461\MiniProfiler.Shared.dll - - - ..\packages\MySql.Data.6.10.7\lib\net452\MySql.Data.dll - - - ..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll - - - ..\packages\NPoco.3.9.4\lib\net45\NPoco.dll - - - ..\packages\Owin.1.0\lib\net40\Owin.dll - - - ..\packages\Semver.2.0.4\lib\net452\Semver.dll - - - ..\packages\Serilog.2.8.0\lib\net46\Serilog.dll - - - ..\packages\Serilog.Enrichers.Process.2.0.1\lib\net45\Serilog.Enrichers.Process.dll - - - ..\packages\Serilog.Enrichers.Thread.3.0.0\lib\net45\Serilog.Enrichers.Thread.dll - - - ..\packages\Serilog.Filters.Expressions.2.0.0\lib\net45\Serilog.Filters.Expressions.dll - - - ..\packages\Serilog.Formatting.Compact.1.0.0\lib\net45\Serilog.Formatting.Compact.dll - - - ..\packages\Serilog.Formatting.Compact.Reader.1.0.3\lib\net45\Serilog.Formatting.Compact.Reader.dll - - - ..\packages\Serilog.Settings.AppSettings.2.2.2\lib\net45\Serilog.Settings.AppSettings.dll - - - ..\packages\Serilog.Sinks.Async.1.3.0\lib\net45\Serilog.Sinks.Async.dll - - - ..\packages\Serilog.Sinks.File.4.0.0\lib\net45\Serilog.Sinks.File.dll - - - ..\packages\Serilog.Sinks.Map.1.0.0\lib\netstandard2.0\Serilog.Sinks.Map.dll - - - ..\packages\Superpower.2.0.0\lib\net45\Superpower.dll - - - - - - - - - - ..\packages\Umbraco.SqlServerCE.4.0.0.1\lib\net472\System.Data.SqlServerCe.dll - - - ..\packages\Umbraco.SqlServerCE.4.0.0.1\lib\net472\System.Data.SqlServerCe.Entity.dll - - - ..\packages\System.Diagnostics.DiagnosticSource.4.4.1\lib\net46\System.Diagnostics.DiagnosticSource.dll - - - - - - - - ..\packages\Microsoft.AspNet.WebApi.Client.5.2.7\lib\net45\System.Net.Http.Formatting.dll - - - - - - - - ..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll - - - - - - - - - - - ..\packages\UmbracoCms.Core.8.1.1\lib\net472\Umbraco.Core.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - \ No newline at end of file diff --git a/uSync8.Core/uSync8Core.cs b/uSync8.Core/uSync8Core.cs deleted file mode 100644 index fc198825..00000000 --- a/uSync8.Core/uSync8Core.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace uSync8.Core -{ - public class uSync8Core - { - } -} diff --git a/uSync8.Core/uSyncCoreComposer.cs b/uSync8.Core/uSyncCoreComposer.cs deleted file mode 100644 index bb115dcb..00000000 --- a/uSync8.Core/uSyncCoreComposer.cs +++ /dev/null @@ -1,81 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Umbraco.Core; -using Umbraco.Core.Models; -using Umbraco.Core.Composing; -using uSync8.Core.Serialization; -using uSync8.Core.Serialization.Serializers; -using uSync8.Core.Tracking; -using uSync8.Core.Tracking.Impliment; -using uSync8.Core.DataTypes; -using uSync8.Core.Dependency; - -namespace uSync8.Core -{ - public class uSyncCoreComposer : IUserComposer - { - public void Compose(Composition composition) - { - /* - // register *all* serializers, except those marked [HideFromTypeFinder] - composition.WithCollectionBuilder() - .Add(() => composition.TypeLoader.GetTypes()); - */ - - // register *all* ConfigurationSerializers except those marked [HideFromTypeFinder] - // has to happen before the DataTypeSerializer is loaded, because that is where - // they are used - composition.WithCollectionBuilder() - .Add(() => composition.TypeLoader.GetTypes()); - - // register the core handlers (we will refactor to make this dynamic) - composition.Register, ContentTypeSerializer>(); - composition.Register, MediaTypeSerializer>(); - composition.Register, MemberTypeSerializer>(); - composition.Register, TemplateSerializer>(); - composition.Register, LanguageSerializer>(); - composition.Register, MacroSerializer>(); - composition.Register, DataTypeSerializer>(); - - // the trackers, allow us to be more nuanced in tracking changes, should - // mean change messages are better. - /* - composition.Register, ContentTypeTracker>(); - composition.Register, MediaTypeTracker>(); - composition.Register, MemberTypeTracker>(); - composition.Register, TemplateTracker>(); - composition.Register, LanguageTracker>(); - composition.Register, MacroTracker>(); - composition.Register, DataTypeTracker>(); - */ - - // the dependency checkers, they build up dependency trees for objects - // this might just merge into the serializers ? - /* - composition.Register, ContentTypeChecker>(); - composition.Register, MediaTypeChecker>(); - composition.Register, MemberTypeChecker>(); - composition.Register, TemplateChecker>(); - composition.Register, LanguageChecker>(); - composition.Register, MacroChecker>(); - composition.Register, DataTypeChecker>(); - */ - - // the trackers, allow us to be more nuanced in tracking changes, should - // mean change messages are better. - composition.WithCollectionBuilder() - .Add(composition.TypeLoader.GetTypes()); - - // load the dependency checkers from a collection - // allows us to extend checkers without changing the core. - composition.WithCollectionBuilder() - .Add(composition.TypeLoader.GetTypes()); - - // item factory, makes all the constructors of handlers way simpler - composition.Register(); - } - } -} diff --git a/uSync8.EventTriggers/EventTriggersComponent.cs b/uSync8.EventTriggers/EventTriggersComponent.cs deleted file mode 100644 index 9846678b..00000000 --- a/uSync8.EventTriggers/EventTriggersComponent.cs +++ /dev/null @@ -1,74 +0,0 @@ -using System.Linq; -using Umbraco.Core.Composing; -using Umbraco.Core.Logging; -using Umbraco.Core.Services.Changes; -using Umbraco.Web.Cache; -using Umbraco.Web.PublishedCache; - -using uSync8.BackOffice; - -namespace uSync8.EventTriggers -{ - /// - /// Composer to register the events. - /// - public class EventTriggersComposer : ComponentComposer { } - - /// - /// Component, will trigger a cache rebuild when an import is completed. (and there are changes) - /// - public class EventTriggersComponent : IComponent - { - private readonly IPublishedSnapshotService snapshotService; - - public EventTriggersComponent(IPublishedSnapshotService snapshotService) - { - this.snapshotService = snapshotService; - } - - public void Initialize() - { - uSyncService.ImportComplete += BulkEventComplete; - } - - private void BulkEventComplete(uSyncBulkEventArgs e) - { - if (e.Actions.Any(x => x.Change > uSync8.Core.ChangeType.NoChange)) - { - // change happened. - rebuild - snapshotService.Rebuild(); - - // then refresh the cache : - - // there is a function for this but it is internal, so we have extracted bits. - // mimics => DistributedCache.RefreshAllPublishedSnapshot - - RefreshContentCache(Umbraco.Web.Composing.Current.DistributedCache); - RefreshMediaCache(Umbraco.Web.Composing.Current.DistributedCache); - RefreshAllDomainCache(Umbraco.Web.Composing.Current.DistributedCache); - } - } - - private void RefreshContentCache(DistributedCache dc) { - var payloads = new[] { new ContentCacheRefresher.JsonPayload(0, TreeChangeTypes.RefreshAll) }; - Umbraco.Web.Composing.Current.DistributedCache.RefreshByPayload(ContentCacheRefresher.UniqueId, payloads); - } - - private void RefreshMediaCache(DistributedCache dc) { - var payloads = new[] { new MediaCacheRefresher.JsonPayload(0, TreeChangeTypes.RefreshAll) }; - dc.RefreshByPayload(MediaCacheRefresher.UniqueId, payloads); - } - - public void RefreshAllDomainCache(DistributedCache dc) - { - var payloads = new[] { new DomainCacheRefresher.JsonPayload(0, DomainChangeTypes.RefreshAll) }; - dc.RefreshByPayload(DomainCacheRefresher.UniqueId, payloads); - } - - - public void Terminate() - { - // end - } - } -} diff --git a/uSync8.EventTriggers/Properties/AssemblyInfo.cs b/uSync8.EventTriggers/Properties/AssemblyInfo.cs deleted file mode 100644 index 75083067..00000000 --- a/uSync8.EventTriggers/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("uSync8.EventTriggers")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("uSync8.EventTriggers")] -[assembly: AssemblyCopyright("Copyright © 2019")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("b3afc1f9-9398-4d8e-be98-1c78bab20ec9")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/uSync8.EventTriggers/app.config b/uSync8.EventTriggers/app.config deleted file mode 100644 index 430296ee..00000000 --- a/uSync8.EventTriggers/app.config +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/uSync8.EventTriggers/packages.config b/uSync8.EventTriggers/packages.config deleted file mode 100644 index 87f8a90c..00000000 --- a/uSync8.EventTriggers/packages.config +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/uSync8.EventTriggers/uSync8.EventTriggers.csproj b/uSync8.EventTriggers/uSync8.EventTriggers.csproj deleted file mode 100644 index c19ed7e7..00000000 --- a/uSync8.EventTriggers/uSync8.EventTriggers.csproj +++ /dev/null @@ -1,261 +0,0 @@ - - - - - Debug - AnyCPU - {B3AFC1F9-9398-4D8E-BE98-1C78BAB20EC9} - Library - Properties - uSync8.EventTriggers - uSync8.EventTriggers - v4.7.2 - 512 - true - - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - ..\packages\ClientDependency.1.9.7\lib\net45\ClientDependency.Core.dll - - - ..\packages\ClientDependency-Mvc5.1.8.0.0\lib\net45\ClientDependency.Core.Mvc.dll - - - ..\packages\CSharpTest.Net.Collections.14.906.1403.1082\lib\net40\CSharpTest.Net.Collections.dll - - - ..\packages\Examine.1.0.0\lib\net452\Examine.dll - - - ..\packages\HtmlAgilityPack.1.8.14\lib\Net45\HtmlAgilityPack.dll - - - ..\packages\SharpZipLib.0.86.0\lib\20\ICSharpCode.SharpZipLib.dll - - - ..\packages\ImageProcessor.2.7.0.100\lib\net452\ImageProcessor.dll - - - ..\packages\LightInject.5.4.0\lib\net46\LightInject.dll - - - ..\packages\LightInject.Annotation.1.1.0\lib\net46\LightInject.Annotation.dll - - - ..\packages\LightInject.Mvc.2.0.0\lib\net46\LightInject.Mvc.dll - - - ..\packages\LightInject.Web.2.0.0\lib\net46\LightInject.Web.dll - - - ..\packages\LightInject.WebApi.2.0.0\lib\net46\LightInject.WebApi.dll - - - ..\packages\Lucene.Net.3.0.3\lib\NET40\Lucene.Net.dll - - - ..\packages\Markdown.2.2.1\lib\net451\Markdown.dll - - - ..\packages\Microsoft.AspNet.Identity.Core.2.2.2\lib\net45\Microsoft.AspNet.Identity.Core.dll - - - ..\packages\Microsoft.AspNet.Identity.Owin.2.2.2\lib\net45\Microsoft.AspNet.Identity.Owin.dll - - - ..\packages\Microsoft.AspNet.SignalR.Core.2.4.0\lib\net45\Microsoft.AspNet.SignalR.Core.dll - - - ..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.2.0.0\lib\netstandard2.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll - - - ..\packages\Microsoft.Owin.4.0.1\lib\net45\Microsoft.Owin.dll - - - ..\packages\Microsoft.Owin.Host.SystemWeb.4.0.1\lib\net45\Microsoft.Owin.Host.SystemWeb.dll - - - ..\packages\Microsoft.Owin.Security.4.0.1\lib\net45\Microsoft.Owin.Security.dll - - - ..\packages\Microsoft.Owin.Security.Cookies.4.0.1\lib\net45\Microsoft.Owin.Security.Cookies.dll - - - ..\packages\Microsoft.Owin.Security.OAuth.4.0.1\lib\net45\Microsoft.Owin.Security.OAuth.dll - - - ..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll - - - ..\packages\MiniProfiler.4.0.138\lib\net461\MiniProfiler.dll - - - ..\packages\MiniProfiler.Shared.4.0.138\lib\net461\MiniProfiler.Shared.dll - - - ..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll - - - ..\packages\NPoco.3.9.4\lib\net45\NPoco.dll - - - ..\packages\Owin.1.0\lib\net40\Owin.dll - - - ..\packages\Semver.2.0.4\lib\net452\Semver.dll - - - ..\packages\Serilog.2.8.0\lib\net46\Serilog.dll - - - ..\packages\Serilog.Enrichers.Process.2.0.1\lib\net45\Serilog.Enrichers.Process.dll - - - ..\packages\Serilog.Enrichers.Thread.3.0.0\lib\net45\Serilog.Enrichers.Thread.dll - - - ..\packages\Serilog.Filters.Expressions.2.0.0\lib\net45\Serilog.Filters.Expressions.dll - - - ..\packages\Serilog.Formatting.Compact.1.0.0\lib\net45\Serilog.Formatting.Compact.dll - - - ..\packages\Serilog.Formatting.Compact.Reader.1.0.3\lib\net45\Serilog.Formatting.Compact.Reader.dll - - - ..\packages\Serilog.Settings.AppSettings.2.2.2\lib\net45\Serilog.Settings.AppSettings.dll - - - ..\packages\Serilog.Sinks.Async.1.3.0\lib\net45\Serilog.Sinks.Async.dll - - - ..\packages\Serilog.Sinks.File.4.0.0\lib\net45\Serilog.Sinks.File.dll - - - ..\packages\Serilog.Sinks.Map.1.0.0\lib\netstandard2.0\Serilog.Sinks.Map.dll - - - ..\packages\Superpower.2.0.0\lib\net45\Superpower.dll - - - - - - - - ..\packages\Umbraco.SqlServerCE.4.0.0.1\lib\net472\System.Data.SqlServerCe.dll - - - ..\packages\Umbraco.SqlServerCE.4.0.0.1\lib\net472\System.Data.SqlServerCe.Entity.dll - - - ..\packages\System.Diagnostics.DiagnosticSource.4.4.1\lib\net46\System.Diagnostics.DiagnosticSource.dll - - - - - ..\packages\Microsoft.AspNet.WebApi.Client.5.2.7\lib\net45\System.Net.Http.Formatting.dll - - - - - - - - ..\packages\System.Threading.Tasks.Dataflow.4.9.0\lib\netstandard2.0\System.Threading.Tasks.Dataflow.dll - - - - ..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll - - - - - ..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.Helpers.dll - - - ..\packages\Microsoft.AspNet.WebApi.Core.5.2.7\lib\net45\System.Web.Http.dll - - - ..\packages\Microsoft.AspNet.WebApi.WebHost.5.2.7\lib\net45\System.Web.Http.WebHost.dll - - - ..\packages\Microsoft.AspNet.Mvc.5.2.7\lib\net45\System.Web.Mvc.dll - - - ..\packages\Microsoft.AspNet.Razor.3.2.7\lib\net45\System.Web.Razor.dll - - - ..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.dll - - - ..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.Deployment.dll - - - ..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.Razor.dll - - - - - - - - - ..\packages\UmbracoCms.Core.8.1.5\lib\net472\Umbraco.Core.dll - - - ..\packages\UmbracoCms.Web.8.1.5\lib\net472\Umbraco.Examine.dll - - - ..\packages\UmbracoCms.Web.8.1.5\lib\net472\Umbraco.Web.dll - - - ..\packages\UmbracoCms.Web.8.1.5\lib\net472\Umbraco.Web.UI.dll - - - - - - - - - - - - - {f2dfcb19-c9ee-471e-b8e2-e0b4dd31761d} - uSync8.BackOffice - - - {79011408-c423-479f-9b0a-8da465de92eb} - uSync8.Core - - - - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - \ No newline at end of file diff --git a/uSync8.Site/App_Plugins/CustomPropertyType/package.manifest b/uSync8.Site/App_Plugins/CustomPropertyType/package.manifest deleted file mode 100644 index 8357fc81..00000000 --- a/uSync8.Site/App_Plugins/CustomPropertyType/package.manifest +++ /dev/null @@ -1,12 +0,0 @@ -{ - "propertyEditors": [ - { - "name": "Custom Property", - "alias": "myCustomProperty", - "editor": { - "valueType": "TEXT", - "view": "~/app_plugins/CustomPropertyType/property.html" - } - } - ] -} diff --git a/uSync8.Site/App_Plugins/CustomPropertyType/property.html b/uSync8.Site/App_Plugins/CustomPropertyType/property.html deleted file mode 100644 index c15068ef..00000000 --- a/uSync8.Site/App_Plugins/CustomPropertyType/property.html +++ /dev/null @@ -1 +0,0 @@ -

Property

\ No newline at end of file diff --git a/uSync8.Site/App_Plugins/DocTypeGridEditor/Css/doctypegrideditor.css b/uSync8.Site/App_Plugins/DocTypeGridEditor/Css/doctypegrideditor.css deleted file mode 100644 index 77133aa2..00000000 --- a/uSync8.Site/App_Plugins/DocTypeGridEditor/Css/doctypegrideditor.css +++ /dev/null @@ -1,43 +0,0 @@ -/*.dtge-dialog fieldset legend { - display: none; -}*/ - -.dtge-dialog input.ng-invalid { - border-color: #9d261d; - -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,0.075); - -moz-box-shadow: inset 0 1px 1px rgba(0,0,0,0.075); - box-shadow: inset 0 1px 1px rgba(0,0,0,0.075); -} - -.dtge-dialog .help-inline { - color: #9d261d; -} - -.dtge-dialog textarea.textstring { - resize: both; - border: 1px solid #bbbabf; -} - -/* - Style the doc type grid editor previews - -.dtge-editor-placeholder { - background-color: #f8f8f8; - background-color: rgba(0,0,0,0.03); - padding: 20px; -} - -.dtge-editor-placeholder .icon { - text-align: center; - display: block; - color: #ddd; - color: rgba(0,0,0,0.1); - font-size: 50px; - line-height: 50px; -} - -.dtge-editor-placeholder .help-text { - text-align: center; - display: block; -} -*/ diff --git a/uSync8.Site/App_Plugins/DocTypeGridEditor/Js/doctypegrideditor.controllers.js b/uSync8.Site/App_Plugins/DocTypeGridEditor/Js/doctypegrideditor.controllers.js deleted file mode 100644 index f4d08e66..00000000 --- a/uSync8.Site/App_Plugins/DocTypeGridEditor/Js/doctypegrideditor.controllers.js +++ /dev/null @@ -1,344 +0,0 @@ -angular.module("umbraco").controller("Our.Umbraco.DocTypeGridEditor.GridEditors.DocTypeGridEditor", [ - - "$scope", - "$rootScope", - "$timeout", - "editorState", - 'assetsService', - "Our.Umbraco.DocTypeGridEditor.Resources.DocTypeGridEditorResources", - "umbRequestHelper", - "localizationService", - "editorService", - - function ($scope, $rootScope, $timeout, editorState, assetsService, dtgeResources, umbRequestHelper, localizationService, editorService) { - - var overlayOptions = { - view: umbRequestHelper.convertVirtualToAbsolutePath( - "~/App_Plugins/DocTypeGridEditor/Views/doctypegrideditor.dialog.html"), - model: {}, - titles: { - insertItem: "Click to insert item", - editItem: "Edit item", - selectContentType: "Choose a Content Type", - selectBlueprint: "Choose a Content Template" - }, - title: "Edit item", - submitButtonlabelKey: "bulk_done" - }; - - $scope.icon = "icon-item-arrangement"; - - // init cached content types if it doesnt exist. - if (!$rootScope.dtgeContentTypes) $rootScope.dtgeContentTypes = {}; - - // localize strings - localizationService.localizeMany(["docTypeGridEditor_insertItem", "docTypeGridEditor_editItem", "docTypeGridEditor_selectContentType", "blueprints_selectBlueprint"]).then(function (data) { - overlayOptions.titles.insertItem = data[0]; - overlayOptions.titles.editItem = data[1]; - overlayOptions.titles.selectContentType = data[2]; - overlayOptions.titles.selectBlueprint = data[3]; - }); - - $scope.setValue = function (data, callback) { - $scope.title = $scope.control.editor.name; - $scope.icon = $scope.control.editor.icon; - $scope.control.value = data; - - if (!("id" in $scope.control.value) || $scope.control.value.id == "") { - $scope.control.value.id = guid(); - } - if ("name" in $scope.control.value.value && $scope.control.value.value.name) { - $scope.title = $scope.control.value.value.name; - } - if ("dtgeContentTypeAlias" in $scope.control.value && $scope.control.value.dtgeContentTypeAlias) { - if (!$rootScope.dtgeContentTypes[$scope.control.value.dtgeContentTypeAlias]) { - - dtgeResources.getContentType($scope.control.value.dtgeContentTypeAlias).then(function (data2) { - var contentType = { - title: data2.title, - description: data2.description, - icon: data2.icon - }; - - // save to cached content types - $rootScope.dtgeContentTypes[$scope.control.value.dtgeContentTypeAlias] = contentType; - $scope.setTitleAndDescription(contentType); - }); - } - else { - $scope.setTitleAndDescription($rootScope.dtgeContentTypes[$scope.control.value.dtgeContentTypeAlias]); - } - } - if (callback) - callback(); - }; - - $scope.setTitleAndDescription = function (contentType) { - $scope.title = contentType.title; - $scope.description = contentType.description; - $scope.icon = contentType.icon; - }; - - $scope.setDocType = function () { - - overlayOptions.editorName = $scope.control.editor.name; - overlayOptions.allowedDocTypes = $scope.control.editor.config.allowedDocTypes || []; - overlayOptions.showDocTypeSelectAsGrid = $scope.control.editor.config.showDocTypeSelectAsGrid === true; - overlayOptions.nameTemplate = $scope.control.editor.config.nameTemplate; - overlayOptions.size = $scope.control.editor.config.largeDialog ? null : "small"; - - overlayOptions.dialogData = { - docTypeAlias: $scope.control.value.dtgeContentTypeAlias, - value: $scope.control.value.value, - id: $scope.control.value.id - }; - overlayOptions.close = function () { - editorService.close(); - } - overlayOptions.submit = function (newModel) { - - // Copy property values to scope model value - if (newModel.node) { - var value = { - name: newModel.editorName - }; - - for (var v = 0; v < newModel.node.variants.length; v++) { - var variant = newModel.node.variants[v]; - for (var t = 0; t < variant.tabs.length; t++) { - var tab = variant.tabs[t]; - for (var p = 0; p < tab.properties.length; p++) { - var prop = tab.properties[p]; - if (typeof prop.value !== "function") { - value[prop.alias] = prop.value; - } - } - } - } - - if (newModel.nameExp) { - var newName = newModel.nameExp(value); // Run it against the stored dictionary value, NOT the node object - if (newName && (newName = $.trim(newName))) { - value.name = newName; - } - } - - newModel.dialogData.value = value; - } else { - newModel.dialogData.value = null; - - } - - $scope.setValue({ - dtgeContentTypeAlias: newModel.dialogData.docTypeAlias, - value: newModel.dialogData.value, - id: newModel.dialogData.id - }); - $scope.setPreview($scope.control.value); - editorService.close(); - }; - - editorService.open(overlayOptions); - }; - - $scope.setPreview = function (model) { - if ($scope.control.editor.config && "enablePreview" in $scope.control.editor.config && $scope.control.editor.config.enablePreview) { - dtgeResources.getEditorMarkupForDocTypePartial(editorState.current.id, model.id, - $scope.control.editor.alias, model.dtgeContentTypeAlias, model.value, - $scope.control.editor.config.viewPath, - $scope.control.editor.config.previewViewPath, - !!editorState.current.publishDate) - .then(function (response) { - var htmlResult = response.data; - if (htmlResult.trim().length > 0) { - $scope.preview = htmlResult; - } - }); - } - }; - - function init() { - $timeout(function () { - if ($scope.control.$initializing) { - $scope.setDocType(); - } else if ($scope.control.value) { - $scope.setPreview($scope.control.value); - } - }, 200); - } - - if ($scope.control.value) { - if (!$scope.control.value.dtgeContentTypeAlias && $scope.control.value.docType) { - $scope.control.value.dtgeContentTypeAlias = $scope.control.value.docType; - } - if ($scope.control.value.docType) { - delete $scope.control.value.docType; - } - if (isGuid($scope.control.value.dtgeContentTypeAlias)) { - dtgeResources.getContentTypeAliasByGuid($scope.control.value.dtgeContentTypeAlias).then(function (data1) { - $scope.control.value.dtgeContentTypeAlias = data1.alias; - $scope.setValue($scope.control.value, init); - }); - } else { - $scope.setValue($scope.control.value, init); - } - } else { - $scope.setValue({ - id: guid(), - dtgeContentTypeAlias: "", - value: {} - }, init); - } - - // Load preview css / js files - if ($scope.control.editor.config && "enablePreview" in $scope.control.editor.config && $scope.control.editor.config.enablePreview) { - if ("previewCssFilePath" in $scope.control.editor.config && $scope.control.editor.config.previewCssFilePath) { - assetsService.loadCss($scope.control.editor.config.previewCssFilePath, $scope); - }; - - if ("previewJsFilePath" in $scope.control.editor.config && $scope.control.editor.config.previewJsFilePath) { - assetsService.loadJs($scope.control.editor.config.previewJsFilePath, $scope); - } - } - - function guid() { - function s4() { - return Math.floor((1 + Math.random()) * 0x10000) - .toString(16) - .substring(1); - } - return s4() + s4() + '-' + s4() + '-' + s4() + '-' + - s4() + '-' + s4() + s4() + s4(); - } - - function isGuid(input) { - return new RegExp("^[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}$", "i").test(input.toString()); - } - - } -]); - -angular.module("umbraco").controller("Our.Umbraco.DocTypeGridEditor.Dialogs.DocTypeGridEditorDialog", - [ - "$scope", - "$interpolate", - "formHelper", - "contentResource", - "Our.Umbraco.DocTypeGridEditor.Resources.DocTypeGridEditorResources", - "Our.Umbraco.DocTypeGridEditor.Services.DocTypeGridEditorUtilityService", - "blueprintConfig", - - function ($scope, $interpolate, formHelper, contentResource, dtgeResources, dtgeUtilityService, blueprintConfig) { - - var vm = this; - vm.submit = submit; - vm.close = close; - vm.loading = true; - vm.blueprintConfig = blueprintConfig; - - function submit() { - if ($scope.model.submit) { - $scope.$broadcast('formSubmitting', { scope: $scope }); - $scope.model.submit($scope.model); - } - } - function close() { - if ($scope.model.close) { - $scope.model.close(); - } - } - - $scope.docTypes = []; - $scope.dialogMode = null; - $scope.selectedDocType = null; - $scope.model.node = null; - - var nameExp = !!$scope.model.nameTemplate - ? $interpolate($scope.model.nameTemplate) - : undefined; - - $scope.model.nameExp = nameExp; - - function createBlank() { - $scope.dialogMode = "edit"; - loadNode(); - }; - - function createOrSelectBlueprintIfAny(docType) { - - $scope.model.dialogData.docTypeAlias = docType.alias; - var blueprintIds = _.keys(docType.blueprints || {}); - $scope.selectedDocType = docType; - - if (blueprintIds.length) { - if (blueprintConfig.skipSelect) { - createFromBlueprint(blueprintIds[0]); - } else { - $scope.dialogMode = "selectBlueprint"; - } - } else { - createBlank(); - } - }; - - function createFromBlueprint(blueprintId) { - contentResource.getBlueprintScaffold(-20, blueprintId).then(function (data) { - // Assign the model to scope - $scope.nodeContext = $scope.model.node = data; - $scope.dialogMode = "edit"; - vm.content = $scope.nodeContext.variants[0]; - vm.loading = false; - }); - }; - - $scope.createBlank = createBlank; - $scope.createOrSelectBlueprintIfAny = createOrSelectBlueprintIfAny; - $scope.createFromBlueprint = createFromBlueprint; - - function loadNode() { - vm.loading = true; - contentResource.getScaffold(-20, $scope.model.dialogData.docTypeAlias).then(function (data) { - - // Merge current value - if ($scope.model.dialogData.value) { - for (var v = 0; v < data.variants.length; v++) { - var variant = data.variants[v]; - for (var t = 0; t < variant.tabs.length; t++) { - var tab = variant.tabs[t]; - for (var p = 0; p < tab.properties.length; p++) { - var prop = tab.properties[p]; - if ($scope.model.dialogData.value[prop.alias]) { - prop.value = $scope.model.dialogData.value[prop.alias]; - } - } - } - } - }; - - // Assign the model to scope - $scope.nodeContext = $scope.model.node = data; - vm.content = $scope.nodeContext.variants[0]; - vm.loading = false; - }); - } - - if ($scope.model.dialogData.docTypeAlias) { - $scope.dialogMode = "edit"; - loadNode(); - } else { - $scope.dialogMode = "selectDocType"; - // No data type, so load a list to choose from - dtgeResources.getContentTypes($scope.model.allowedDocTypes).then(function (docTypes) { - $scope.docTypes = docTypes; - if ($scope.docTypes.length == 1) { - createOrSelectBlueprintIfAny($scope.docTypes[0]); - } - else { - vm.loading = false; - } - }); - } - - } - - ]); diff --git a/uSync8.Site/App_Plugins/DocTypeGridEditor/Js/doctypegrideditor.directives.js b/uSync8.Site/App_Plugins/DocTypeGridEditor/Js/doctypegrideditor.directives.js deleted file mode 100644 index 66f27245..00000000 --- a/uSync8.Site/App_Plugins/DocTypeGridEditor/Js/doctypegrideditor.directives.js +++ /dev/null @@ -1,13 +0,0 @@ -angular.module("umbraco.directives").directive("dtgeBindHtmlCompile", ["$compile", function ($compile) { - return { - restrict: "A", - link: function (scope, element, attrs) { - scope.$watch(function () { - return scope.$eval(attrs.dtgeBindHtmlCompile); - }, function (value) { - element.html(value); - $compile(element.contents())(scope); - }); - } - }; -}]); \ No newline at end of file diff --git a/uSync8.Site/App_Plugins/DocTypeGridEditor/Js/doctypegrideditor.resources.js b/uSync8.Site/App_Plugins/DocTypeGridEditor/Js/doctypegrideditor.resources.js deleted file mode 100644 index 5fead733..00000000 --- a/uSync8.Site/App_Plugins/DocTypeGridEditor/Js/doctypegrideditor.resources.js +++ /dev/null @@ -1,56 +0,0 @@ -angular.module('umbraco.resources').factory('Our.Umbraco.DocTypeGridEditor.Resources.DocTypeGridEditorResources', - function ($q, $http, umbRequestHelper) { - return { - getContentTypeAliasByGuid: function (guid) { - var url = umbRequestHelper.convertVirtualToAbsolutePath("~/umbraco/backoffice/DocTypeGridEditorApi/DocTypeGridEditorApi/GetContentTypeAliasByGuid?guid=" + guid); - return umbRequestHelper.resourcePromise( - $http.get(url), - 'Failed to retrieve content type alias by guid' - ); - }, - getContentTypes: function (allowedContentTypes) { - var url = umbRequestHelper.convertVirtualToAbsolutePath("~/umbraco/backoffice/DocTypeGridEditorApi/DocTypeGridEditorApi/GetContentTypes"); - if (allowedContentTypes) { - for (var i = 0; i < allowedContentTypes.length; i++) { - url += (i == 0 ? "?" : "&") + "allowedContentTypes=" + allowedContentTypes[i]; - } - } - return umbRequestHelper.resourcePromise( - $http.get(url), - 'Failed to retrieve content types' - ); - }, - getContentType: function (contentTypeAlias) { - var url = umbRequestHelper.convertVirtualToAbsolutePath("~/umbraco/backoffice/DocTypeGridEditorApi/DocTypeGridEditorApi/GetContentType?contentTypeAlias=" + contentTypeAlias); - return umbRequestHelper.resourcePromise( - $http.get(url), - 'Failed to retrieve content type icon' - ); - }, - getDataTypePreValues: function (dtdId) { - var url = umbRequestHelper.convertVirtualToAbsolutePath("~/umbraco/backoffice/DocTypeGridEditorApi/DocTypeGridEditorApi/GetDataTypePreValues?dtdid=" + dtdId); - return umbRequestHelper.resourcePromise( - $http.get(url), - 'Failed to retrieve datatypes' - ); - }, - getEditorMarkupForDocTypePartial: function (pageId, id, editorAlias, contentTypeAlias, value, viewPath, previewViewPath, published) { - var url = umbRequestHelper.convertVirtualToAbsolutePath("~/umbraco/backoffice/DocTypeGridEditorApi/DocTypeGridEditorApi/GetPreviewMarkup?dtgePreview=1&pageId=" + pageId); - return $http({ - method: 'POST', - url: url, - data: $.param({ - id: id, - editorAlias: editorAlias, - contentTypeAlias: contentTypeAlias, - value: JSON.stringify(value), - viewPath: viewPath, - previewViewPath: previewViewPath - }), - headers: { - 'Content-Type': 'application/x-www-form-urlencoded' - } - }); - } - }; - }); \ No newline at end of file diff --git a/uSync8.Site/App_Plugins/DocTypeGridEditor/Js/doctypegrideditor.services.js b/uSync8.Site/App_Plugins/DocTypeGridEditor/Js/doctypegrideditor.services.js deleted file mode 100644 index 370ca0ef..00000000 --- a/uSync8.Site/App_Plugins/DocTypeGridEditor/Js/doctypegrideditor.services.js +++ /dev/null @@ -1,63 +0,0 @@ -angular.module('umbraco.services').factory('Our.Umbraco.DocTypeGridEditor.Services.DocTypeGridEditorUtilityService', function () { - - function compareCurrentUmbracoVersion(v, options) { - return this.compareVersions(Umbraco.Sys.ServerVariables.application.version, v, options); - } - - function compareVersions(v1, v2, options) { - - var lexicographical = options && options.lexicographical, - zeroExtend = options && options.zeroExtend, - v1parts = v1.split('.'), - v2parts = v2.split('.'); - - function isValidPart(x) { - return (lexicographical ? /^\d+[A-Za-z]*$/ : /^\d+$/).test(x); - } - - if (!v1parts.every(isValidPart) || !v2parts.every(isValidPart)) { - return NaN; - } - - if (zeroExtend) { - while (v1parts.length < v2parts.length) { - v1parts.push("0"); - } - while (v2parts.length < v1parts.length) { - v2parts.push("0"); - } - } - - if (!lexicographical) { - v1parts = v1parts.map(Number); - v2parts = v2parts.map(Number); - } - - for (var i = 0; i < v1parts.length; ++i) { - if (v2parts.length === i) { - return 1; - } - - if (v1parts[i] === v2parts[i]) { - continue; - } else if (v1parts[i] > v2parts[i]) { - return 1; - } else { - return -1; - } - } - - if (v1parts.length !== v2parts.length) { - return -1; - } - - return 0; - } - - var service = { - compareCurrentUmbracoVersion: compareCurrentUmbracoVersion, - compareVersions: compareVersions - }; - - return service; -}); \ No newline at end of file diff --git a/uSync8.Site/App_Plugins/DocTypeGridEditor/Lang/da-DK.xml b/uSync8.Site/App_Plugins/DocTypeGridEditor/Lang/da-DK.xml deleted file mode 100644 index a1a322d8..00000000 --- a/uSync8.Site/App_Plugins/DocTypeGridEditor/Lang/da-DK.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - Vælg en indholdstype - Rediger indhold - Klik for at indsætte - - \ No newline at end of file diff --git a/uSync8.Site/App_Plugins/DocTypeGridEditor/Lang/en-GB.xml b/uSync8.Site/App_Plugins/DocTypeGridEditor/Lang/en-GB.xml deleted file mode 100644 index f88aeab6..00000000 --- a/uSync8.Site/App_Plugins/DocTypeGridEditor/Lang/en-GB.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - Select a Content Type - Edit item - Click to insert item - - \ No newline at end of file diff --git a/uSync8.Site/App_Plugins/DocTypeGridEditor/Lang/en-US.xml b/uSync8.Site/App_Plugins/DocTypeGridEditor/Lang/en-US.xml deleted file mode 100644 index d526de2b..00000000 --- a/uSync8.Site/App_Plugins/DocTypeGridEditor/Lang/en-US.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - Select a Content Type - Edit item - Click to insert item - - \ No newline at end of file diff --git a/uSync8.Site/App_Plugins/DocTypeGridEditor/Render/DocTypeGridEditor.cshtml b/uSync8.Site/App_Plugins/DocTypeGridEditor/Render/DocTypeGridEditor.cshtml deleted file mode 100644 index 1878a81e..00000000 --- a/uSync8.Site/App_Plugins/DocTypeGridEditor/Render/DocTypeGridEditor.cshtml +++ /dev/null @@ -1,30 +0,0 @@ -@using System.Web.Mvc -@using System.Web.Mvc.Html -@using Microsoft.CSharp.RuntimeBinder -@using Our.Umbraco.DocTypeGridEditor.Helpers -@using Our.Umbraco.DocTypeGridEditor.Web.Extensions -@inherits Umbraco.Web.Mvc.UmbracoViewPage -@if (Model.value != null) -{ - string id = Model.value.id.ToString(); - string editorAlias = Model.editor.alias.ToString(); - string contentTypeAlias = ""; - string value = Model.value.value.ToString(); - string viewPath = Model.editor.config.viewPath.ToString(); - - try - { - contentTypeAlias = Model.value.dtgeContentTypeAlias.ToString(); - } - catch (RuntimeBinderException) - { - contentTypeAlias = Model.value.docType.ToString(); - } - - if (contentTypeAlias != "") - { - var content = DocTypeGridEditorHelper.ConvertValueToContent(id, contentTypeAlias, value); - - @Html.RenderDocTypeGridEditorItem(content, editorAlias, viewPath) - } -} diff --git a/uSync8.Site/App_Plugins/DocTypeGridEditor/Render/DocTypeGridEditorPreviewer.cshtml b/uSync8.Site/App_Plugins/DocTypeGridEditor/Render/DocTypeGridEditorPreviewer.cshtml deleted file mode 100644 index d76a770e..00000000 --- a/uSync8.Site/App_Plugins/DocTypeGridEditor/Render/DocTypeGridEditorPreviewer.cshtml +++ /dev/null @@ -1,3 +0,0 @@ -@using Our.Umbraco.DocTypeGridEditor.Web.Extensions -@inherits Umbraco.Web.Mvc.UmbracoViewPage -@Html.RenderDocTypeGridEditorItem(Model.Item, Model.EditorAlias, Model.ViewPath, Model.PreviewViewPath, true) \ No newline at end of file diff --git a/uSync8.Site/App_Plugins/DocTypeGridEditor/Views/doctypegrideditor.dialog.html b/uSync8.Site/App_Plugins/DocTypeGridEditor/Views/doctypegrideditor.dialog.html deleted file mode 100644 index 1b770a59..00000000 --- a/uSync8.Site/App_Plugins/DocTypeGridEditor/Views/doctypegrideditor.dialog.html +++ /dev/null @@ -1,117 +0,0 @@ -
- - - - - - - - -
- - - - - - - -
- -
- - - - - - - - - -
-
diff --git a/uSync8.Site/App_Plugins/DocTypeGridEditor/Views/doctypegrideditor.html b/uSync8.Site/App_Plugins/DocTypeGridEditor/Views/doctypegrideditor.html deleted file mode 100644 index 14c7b79b..00000000 --- a/uSync8.Site/App_Plugins/DocTypeGridEditor/Views/doctypegrideditor.html +++ /dev/null @@ -1,19 +0,0 @@ -
-
-
- -
- {{title}} -
-
- {{description}} -
-
-
-
-
-
diff --git a/uSync8.Site/App_Plugins/DocTypeGridEditor/package.manifest b/uSync8.Site/App_Plugins/DocTypeGridEditor/package.manifest deleted file mode 100644 index d5de3c27..00000000 --- a/uSync8.Site/App_Plugins/DocTypeGridEditor/package.manifest +++ /dev/null @@ -1,29 +0,0 @@ -{ - "gridEditors": [ - { - "name": "Doc Type", - "alias": "docType", - "view": "/App_Plugins/DocTypeGridEditor/Views/doctypegrideditor.html", - "render": "/App_Plugins/DocTypeGridEditor/Render/DocTypeGridEditor.cshtml", - "icon": "icon-item-arrangement", - "config": { - "allowedDocTypes": [ "gridBit" ], - "nameTemplate": "", - "enablePreview": false, - "viewPath": "/Views/Partials/Grid/Editors/DocTypeGridEditor/", - "previewViewPath": "/Views/Partials/Grid/Editors/DocTypeGridEditor/Previews/", - "previewCssFilePath": "", - "previewJsFilePath": "" - } - } - ], - "javascript": [ - "~/App_Plugins/DocTypeGridEditor/Js/doctypegrideditor.resources.js", - "~/App_Plugins/DocTypeGridEditor/Js/doctypegrideditor.services.js", - "~/App_Plugins/DocTypeGridEditor/Js/doctypegrideditor.controllers.js", - "~/App_Plugins/DocTypeGridEditor/Js/doctypegrideditor.directives.js" - ], - "css": [ - "~/App_Plugins/DocTypeGridEditor/Css/doctypegrideditor.css" - ] -} diff --git a/uSync8.Site/App_Plugins/ModelsBuilder/modelsbuilder.controller.js b/uSync8.Site/App_Plugins/ModelsBuilder/modelsbuilder.controller.js deleted file mode 100644 index b0e0c303..00000000 --- a/uSync8.Site/App_Plugins/ModelsBuilder/modelsbuilder.controller.js +++ /dev/null @@ -1,38 +0,0 @@ -function modelsBuilderController($scope, $http, umbRequestHelper, modelsBuilderResource) { - - var vm = this; - - vm.reload = reload; - vm.generate = generate; - vm.dashboard = null; - - function generate() { - vm.generating = true; - umbRequestHelper.resourcePromise( - $http.post(umbRequestHelper.getApiUrl("modelsBuilderBaseUrl", "BuildModels")), - 'Failed to generate.') - .then(function (result) { - vm.generating = false; - vm.dashboard = result; - }); - } - - function reload() { - vm.loading = true; - modelsBuilderResource.getDashboard().then(function (result) { - vm.dashboard = result; - vm.loading = false; - }); - } - - function init() { - vm.loading = true; - modelsBuilderResource.getDashboard().then(function (result) { - vm.dashboard = result; - vm.loading = false; - }); - } - - init(); -} -angular.module("umbraco").controller("Umbraco.Dashboard.ModelsBuilderController", modelsBuilderController); \ No newline at end of file diff --git a/uSync8.Site/App_Plugins/ModelsBuilder/modelsbuilder.html b/uSync8.Site/App_Plugins/ModelsBuilder/modelsbuilder.html deleted file mode 100644 index 0c10c33e..00000000 --- a/uSync8.Site/App_Plugins/ModelsBuilder/modelsbuilder.html +++ /dev/null @@ -1,44 +0,0 @@ -
- - - - -
- -
- -

Models Builder

- - - -
-
- -
-

Models are out-of-date.

-
- -
-
-

Generating models will restart the application.

-
-
- -
-
-
-
-
- -
- Last generation failed with the following error: -
{{vm.dashboard.lastError}}
-
-
- -
-
- -
diff --git a/uSync8.Site/App_Plugins/ModelsBuilder/modelsbuilder.resource.js b/uSync8.Site/App_Plugins/ModelsBuilder/modelsbuilder.resource.js deleted file mode 100644 index 58ca77cb..00000000 --- a/uSync8.Site/App_Plugins/ModelsBuilder/modelsbuilder.resource.js +++ /dev/null @@ -1,23 +0,0 @@ -function modelsBuilderResource($q, $http, umbRequestHelper) { - - return { - getModelsOutOfDateStatus: function () { - return umbRequestHelper.resourcePromise( - $http.get(umbRequestHelper.getApiUrl("modelsBuilderBaseUrl", "GetModelsOutOfDateStatus")), - "Failed to get models out-of-date status"); - }, - - buildModels: function () { - return umbRequestHelper.resourcePromise( - $http.post(umbRequestHelper.getApiUrl("modelsBuilderBaseUrl", "BuildModels")), - "Failed to build models"); - }, - - getDashboard: function () { - return umbRequestHelper.resourcePromise( - $http.get(umbRequestHelper.getApiUrl("modelsBuilderBaseUrl", "GetDashboard")), - "Failed to get dashboard"); - } - }; -} -angular.module("umbraco.resources").factory("modelsBuilderResource", modelsBuilderResource); diff --git a/uSync8.Site/App_Plugins/ModelsBuilder/package.manifest b/uSync8.Site/App_Plugins/ModelsBuilder/package.manifest deleted file mode 100644 index 5e641770..00000000 --- a/uSync8.Site/App_Plugins/ModelsBuilder/package.manifest +++ /dev/null @@ -1,18 +0,0 @@ -{ - // array of files we want to inject into the application - "javascript": [ - "~/App_Plugins/ModelsBuilder/modelsbuilder.controller.js", - "~/App_Plugins/ModelsBuilder/modelsbuilder.resource.js" - ], - - // models builder dashboard - "dashboards": [ - { - "alias": "settingsModelsBuilder", - "name": "Models Builder", - "view": "/App_Plugins/ModelsBuilder/modelsbuilder.html", - "sections": [ "settings" ], - "weight": 40 - } - ] -} \ No newline at end of file diff --git a/uSync8.Site/App_Plugins/uSync8/dashboard.html b/uSync8.Site/App_Plugins/uSync8/dashboard.html deleted file mode 100644 index 0d7ad821..00000000 --- a/uSync8.Site/App_Plugins/uSync8/dashboard.html +++ /dev/null @@ -1,163 +0,0 @@ -
- - - -
-
-

uSync 8 - + {{vm.addOnString}}

- 8.0-beta5 - -
-
- - - - -
-
-
-
- -
- - -
- - - - - - - - -
-
- - -
-
- -
{{handler.Name}}
-
-
-
-
-

{{vm.status.Message}}

- {{vm.update.Message}} -
-
-
-
-
-
-
-
-
-
- - -
-
-
{{vm.action}}
-
{{vm.countChanges(vm.results)}} changes across {{vm.results.length}} items
-
- -
- -
-
-
-
-
-
- Type -
-
- Name -
-
- Change -
-
- Message -
-
-
-
-
-
-
-
- - - -
-
- {{vm.getTypeName(result.ItemType)}} -
-
- {{result.Name}} -
-
- {{result.Change}} -
-
- {{result.Message}} -
-
- -
- ({{result.Details.length}} items) -
-
-
-
-
-
-
-

No Changes

-
-
-
-
- -
-
-
-
diff --git a/uSync8.Site/App_Plugins/uSync8/lib/diff_match_patch.js b/uSync8.Site/App_Plugins/uSync8/lib/diff_match_patch.js deleted file mode 100644 index 2fe320a1..00000000 --- a/uSync8.Site/App_Plugins/uSync8/lib/diff_match_patch.js +++ /dev/null @@ -1,55 +0,0 @@ -var diff_match_patch=function(){this.Diff_Timeout=1;this.Diff_EditCost=4;this.Match_Threshold=.5;this.Match_Distance=1E3;this.Patch_DeleteThreshold=.5;this.Patch_Margin=4;this.Match_MaxBits=32},DIFF_DELETE=-1,DIFF_INSERT=1,DIFF_EQUAL=0;diff_match_patch.Diff=function(a,b){this[0]=a;this[1]=b};diff_match_patch.Diff.prototype.length=2;diff_match_patch.Diff.prototype.toString=function(){return this[0]+","+this[1]}; -diff_match_patch.prototype.diff_main=function(a,b,c,d){"undefined"==typeof d&&(d=0>=this.Diff_Timeout?Number.MAX_VALUE:(new Date).getTime()+1E3*this.Diff_Timeout);if(null==a||null==b)throw Error("Null input. (diff_main)");if(a==b)return a?[new diff_match_patch.Diff(DIFF_EQUAL,a)]:[];"undefined"==typeof c&&(c=!0);var e=c,f=this.diff_commonPrefix(a,b);c=a.substring(0,f);a=a.substring(f);b=b.substring(f);f=this.diff_commonSuffix(a,b);var g=a.substring(a.length-f);a=a.substring(0,a.length-f);b=b.substring(0, -b.length-f);a=this.diff_compute_(a,b,e,d);c&&a.unshift(new diff_match_patch.Diff(DIFF_EQUAL,c));g&&a.push(new diff_match_patch.Diff(DIFF_EQUAL,g));this.diff_cleanupMerge(a);return a}; -diff_match_patch.prototype.diff_compute_=function(a,b,c,d){if(!a)return[new diff_match_patch.Diff(DIFF_INSERT,b)];if(!b)return[new diff_match_patch.Diff(DIFF_DELETE,a)];var e=a.length>b.length?a:b,f=a.length>b.length?b:a,g=e.indexOf(f);return-1!=g?(c=[new diff_match_patch.Diff(DIFF_INSERT,e.substring(0,g)),new diff_match_patch.Diff(DIFF_EQUAL,f),new diff_match_patch.Diff(DIFF_INSERT,e.substring(g+f.length))],a.length>b.length&&(c[0][0]=c[2][0]=DIFF_DELETE),c):1==f.length?[new diff_match_patch.Diff(DIFF_DELETE, -a),new diff_match_patch.Diff(DIFF_INSERT,b)]:(e=this.diff_halfMatch_(a,b))?(b=e[1],f=e[3],a=e[4],e=this.diff_main(e[0],e[2],c,d),c=this.diff_main(b,f,c,d),e.concat([new diff_match_patch.Diff(DIFF_EQUAL,a)],c)):c&&100c);t++){for(var v=-t+p;v<=t-x;v+=2){var n=f+v;var r=v==-t||v!=t&&h[n-1]d)x+=2;else if(y>e)p+=2;else if(m&&(n=f+k-v,0<=n&&n= -u)return this.diff_bisectSplit_(a,b,r,y,c)}}for(v=-t+w;v<=t-q;v+=2){n=f+v;u=v==-t||v!=t&&l[n-1]d)q+=2;else if(r>e)w+=2;else if(!m&&(n=f+k-v,0<=n&&n=u)))return this.diff_bisectSplit_(a,b,r,y,c)}}return[new diff_match_patch.Diff(DIFF_DELETE,a),new diff_match_patch.Diff(DIFF_INSERT,b)]}; -diff_match_patch.prototype.diff_bisectSplit_=function(a,b,c,d,e){var f=a.substring(0,c),g=b.substring(0,d);a=a.substring(c);b=b.substring(d);f=this.diff_main(f,g,!1,e);e=this.diff_main(a,b,!1,e);return f.concat(e)}; -diff_match_patch.prototype.diff_linesToChars_=function(a,b){function c(a){for(var b="",c=0,g=-1,h=d.length;gd?a=a.substring(c-d):c=a.length?[h,k,l,m,g]:null}if(0>=this.Diff_Timeout)return null; -var d=a.length>b.length?a:b,e=a.length>b.length?b:a;if(4>d.length||2*e.lengthd[4].length?g:d:d:g;else return null;if(a.length>b.length){d=g[0];e=g[1];var h=g[2];var l=g[3]}else h=g[0],l=g[1],d=g[2],e=g[3];return[d,e,h,l,g[4]]}; -diff_match_patch.prototype.diff_cleanupSemantic=function(a){for(var b=!1,c=[],d=0,e=null,f=0,g=0,h=0,l=0,k=0;f=e){if(d>=b.length/2||d>=c.length/2)a.splice(f,0,new diff_match_patch.Diff(DIFF_EQUAL,c.substring(0,d))),a[f-1][1]=b.substring(0,b.length-d),a[f+1][1]=c.substring(d),f++}else if(e>=b.length/2||e>=c.length/2)a.splice(f,0,new diff_match_patch.Diff(DIFF_EQUAL,b.substring(0,e))),a[f-1][0]=DIFF_INSERT,a[f-1][1]=c.substring(0,c.length-e),a[f+1][0]=DIFF_DELETE, -a[f+1][1]=b.substring(e),f++;f++}f++}}; -diff_match_patch.prototype.diff_cleanupSemanticLossless=function(a){function b(a,b){if(!a||!b)return 6;var c=a.charAt(a.length-1),d=b.charAt(0),e=c.match(diff_match_patch.nonAlphaNumericRegex_),f=d.match(diff_match_patch.nonAlphaNumericRegex_),g=e&&c.match(diff_match_patch.whitespaceRegex_),h=f&&d.match(diff_match_patch.whitespaceRegex_);c=g&&c.match(diff_match_patch.linebreakRegex_);d=h&&d.match(diff_match_patch.linebreakRegex_);var k=c&&a.match(diff_match_patch.blanklineEndRegex_),l=d&&b.match(diff_match_patch.blanklineStartRegex_); -return k||l?5:c||d?4:e&&!g&&h?3:g||h?2:e||f?1:0}for(var c=1;c=k&&(k=m,g=d,h=e,l=f)}a[c-1][1]!=g&&(g?a[c-1][1]=g:(a.splice(c- -1,1),c--),a[c][1]=h,l?a[c+1][1]=l:(a.splice(c+1,1),c--))}c++}};diff_match_patch.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/;diff_match_patch.whitespaceRegex_=/\s/;diff_match_patch.linebreakRegex_=/[\r\n]/;diff_match_patch.blanklineEndRegex_=/\n\r?\n$/;diff_match_patch.blanklineStartRegex_=/^\r?\n\r?\n/; -diff_match_patch.prototype.diff_cleanupEfficiency=function(a){for(var b=!1,c=[],d=0,e=null,f=0,g=!1,h=!1,l=!1,k=!1;fb)break;e=c;f=d}return a.length!=g&&a[g][0]===DIFF_DELETE?f:f+(b-e)}; -diff_match_patch.prototype.diff_prettyHtml=function(a){for(var b=[],c=/&/g,d=//g,f=/\n/g,g=0;g");switch(h){case DIFF_INSERT:b[g]=''+l+"";break;case DIFF_DELETE:b[g]=''+l+"";break;case DIFF_EQUAL:b[g]=""+l+""}}return b.join("")}; -diff_match_patch.prototype.diff_text1=function(a){for(var b=[],c=0;cthis.Match_MaxBits)throw Error("Pattern too long for this browser.");var e=this.match_alphabet_(b),f=this,g=this.Match_Threshold,h=a.indexOf(b,c);-1!=h&&(g=Math.min(d(0,h),g),h=a.lastIndexOf(b,c+b.length),-1!=h&&(g=Math.min(d(0,h),g)));var l=1<=k;q--){var t=e[a.charAt(q-1)];m[q]=0===w?(m[q+1]<<1|1)&t:(m[q+1]<<1|1)&t|(x[q+1]|x[q])<<1|1|x[q+1];if(m[q]&l&&(t=d(w,q-1),t<=g))if(g=t,h=q-1,h>c)k=Math.max(1,2*c-h);else break}if(d(w+1,c)>g)break;x=m}return h}; -diff_match_patch.prototype.match_alphabet_=function(a){for(var b={},c=0;c=2*this.Patch_Margin&&e&&(this.patch_addContext_(a,h),c.push(a),a=new diff_match_patch.patch_obj,e=0,h=d,f=g)}k!==DIFF_INSERT&&(f+=m.length);k!==DIFF_DELETE&&(g+=m.length)}e&&(this.patch_addContext_(a,h),c.push(a));return c}; -diff_match_patch.prototype.patch_deepCopy=function(a){for(var b=[],c=0;cthis.Match_MaxBits){var k=this.match_main(b,h.substring(0,this.Match_MaxBits),g);-1!=k&&(l=this.match_main(b,h.substring(h.length-this.Match_MaxBits),g+h.length-this.Match_MaxBits),-1==l||k>=l)&&(k=-1)}else k=this.match_main(b,h, -g);if(-1==k)e[f]=!1,d-=a[f].length2-a[f].length1;else if(e[f]=!0,d=k-g,g=-1==l?b.substring(k,k+h.length):b.substring(k,l+this.Match_MaxBits),h==g)b=b.substring(0,k)+this.diff_text2(a[f].diffs)+b.substring(k+h.length);else if(g=this.diff_main(h,g,!1),h.length>this.Match_MaxBits&&this.diff_levenshtein(g)/h.length>this.Patch_DeleteThreshold)e[f]=!1;else{this.diff_cleanupSemanticLossless(g);h=0;var m;for(l=0;le[0][1].length){var f=b-e[0][1].length;e[0][1]=c.substring(e[0][1].length)+e[0][1];d.start1-=f;d.start2-=f;d.length1+=f;d.length2+=f}d=a[a.length-1];e=d.diffs; -0==e.length||e[e.length-1][0]!=DIFF_EQUAL?(e.push(new diff_match_patch.Diff(DIFF_EQUAL,c)),d.length1+=b,d.length2+=b):b>e[e.length-1][1].length&&(f=b-e[e.length-1][1].length,e[e.length-1][1]+=c.substring(0,f),d.length1+=f,d.length2+=f);return c}; -diff_match_patch.prototype.patch_splitMax=function(a){for(var b=this.Match_MaxBits,c=0;c2*b?(h.length1+=k.length,e+=k.length,l=!1,h.diffs.push(new diff_match_patch.Diff(g,k)),d.diffs.shift()):(k=k.substring(0,b-h.length1-this.Patch_Margin),h.length1+=k.length,e+=k.length,g===DIFF_EQUAL?(h.length2+=k.length,f+=k.length):l=!1,h.diffs.push(new diff_match_patch.Diff(g,k)),k==d.diffs[0][1]?d.diffs.shift():d.diffs[0][1]=d.diffs[0][1].substring(k.length))}g=this.diff_text2(h.diffs); -g=g.substring(g.length-this.Patch_Margin);k=this.diff_text1(d.diffs).substring(0,this.Patch_Margin);""!==k&&(h.length1+=k.length,h.length2+=k.length,0!==h.diffs.length&&h.diffs[h.diffs.length-1][0]===DIFF_EQUAL?h.diffs[h.diffs.length-1][1]+=k:h.diffs.push(new diff_match_patch.Diff(DIFF_EQUAL,k)));l||a.splice(++c,0,h)}}};diff_match_patch.prototype.patch_toText=function(a){for(var b=[],c=0;c -
- - - - -
- - -
-
Import at startup
-
Run an import of files from the disk when Umbraco starts
-
-
- -
- - -
-
Export at startup
-
Export the Umbraco settings when the site starts up
-
-
- - -
- - -
-
Export on Save
-
Generate uSync files when items are saved
-
-
-
-
- - - - -
- - -
-
Flat structure
-
All items of a type are stored in a flat folder structure
-
-
-
- - -
-
use Guids for filenames
-
use the guid of an item as the filename
-
-
-
- -
-
- -
-
-
- -
-
-
- - - -
- - - -
-
- {{handler.Alias}} -
-
- Enabled for : - {{handler.DefaultConfig.Actions}} - All -
-
-
-
-
-
- \ No newline at end of file diff --git a/uSync8.Site/App_Plugins/uSync8/uSyncDashboardController.js b/uSync8.Site/App_Plugins/uSync8/uSyncDashboardController.js deleted file mode 100644 index f87e739f..00000000 --- a/uSync8.Site/App_Plugins/uSync8/uSyncDashboardController.js +++ /dev/null @@ -1,288 +0,0 @@ -/** - *@ngdoc - *@name uSync8DashboardController - *@requires uSync8DashboardService - * - *@description controller for the uSync dashboard - */ - -(function () { - 'use strict'; - - function uSyncDashboardController($scope, - notificationsService, - editorService, - uSync8DashboardService, - uSyncHub) { - - var vm = this; - vm.loading = true; - - vm.working = false; - vm.reported = false; - vm.syncing = false; - - var modes = { - NONE: 0, - REPORT: 1, - IMPORT: 2, - EXPORT: 3 - }; - - vm.runmode = modes.NONE; - - vm.showAll = false; - vm.settingsView = false; - - vm.settings = {}; - vm.handlers = []; - vm.status = {}; - - vm.reportAction = ''; - - // buttons - - vm.importButton = { - state: 'init', - defaultButton: { - labelKey: "usync_import", - handler: importItems - }, - subButtons: [{ - labelKey: "usync_importforce", - handler: importForce - }] - }; - - - // functions - vm.report = report; - vm.exportItems = exportItems; - vm.importForce = importForce; - vm.importItems = importItems; - - vm.saveSettings = saveSettings; - - vm.toggleDetails = toggleDetails; - vm.getTypeName = getTypeName; - vm.toggleAll = toggleAll; - vm.countChanges = countChanges; - vm.calcPercentage = calcPercentage; - - vm.toggleSettings = toggleSettings; - vm.toggle = toggle; - - vm.showChange = showChange; - - vm.openDetail = openDetail; - - // kick it all off - init(); - - ////// public - - function report() { - resetStatus(modes.REPORT); - - uSync8DashboardService.report(getClientId()) - .then(function (result) { - vm.results = result.data; - vm.working = false; - vm.reported = true; - }, function (error) { - notificationsService.error('Reporting', error.data.Message); - }); - } - - function exportItems() { - resetStatus(modes.EXPORT); - - uSync8DashboardService.exportItems(getClientId()) - .then(function (result) { - vm.results = result.data; - vm.working = false; - vm.reported = true; - }, function (error) { - notificationsService.error('Exporting', error.data.Message); - }); - } - - function importForce() { - importItems(true); - } - - function importItems(force) { - resetStatus(modes.IMPORT); - vm.importButton.state = 'busy'; - - uSync8DashboardService.importItems(force, getClientId()) - .then(function (result) { - vm.results = result.data; - vm.working = false; - vm.reported = true; - vm.importButton.state = 'success'; - }, function (error) { - vm.importButton.state = 'error'; - notificationsService.error('Failed', error.data.ExceptionMessage); - - vm.working = false; - vm.reported = true; - }); - } - - function saveSettings() { - vm.working = false; - uSync8DashboardService.saveSettings(vm.settings) - .then(function (result) { - vm.working = false; - notificationsService.success('Saved', 'Settings updated'); - }, function (error) { - notificationsService.error('Saving', error.data.Message); - }); - } - - function toggleDetails(result) { - result.showDetails = !result.showDetails; - } - - - function getTypeName(typeName) { - var umbType = typeName.substring(0, typeName.indexOf(',')); - return umbType.substring(umbType.lastIndexOf('.') + 1); - } - - function toggleAll() { - vm.showAll = !vm.showAll; - } - - function showChange(change) { - return vm.showAll || (change !== 'NoChange' && change !== 'Removed'); - } - - function countChanges(changes) { - var count = 0; - angular.forEach(changes, function (val, key) { - if (val.Change !== 'NoChange') { - count++; - } - }); - - return count; - } - - function calcPercentage(status) { - return (100 * status.Count) / status.Total; - } - - function toggle(item) { - item = !item; - } - - function toggleSettings() { - vm.settingsView = !vm.settingsView; - } - - function openDetail(item) { - - var options = { - item: item, - title: 'uSync Change', - view: "/App_Plugins/uSync8/changeDialog.html", - close: function () { - editorService.close(); - } - }; - editorService.open(options); - - } - - ////// private - - function init() { - - uSyncHub.initHub(function (hub) { - - vm.hub = hub; - - vm.hub.on('add', function (data) { - vm.status = data; - }); - - vm.hub.on('update', function (update) { - vm.update = update; - }); - - vm.hub.start(); - }); - - getSettings(); - getHandlers(); - } - - function getSettings() { - - uSync8DashboardService.getSettings() - .then(function (result) { - vm.settings = result.data; - vm.loading = false; - }); - - uSync8DashboardService.getAddOnString() - .then(function (result) { - vm.addOnString = result.data; - }); - } - - function getHandlers() { - uSync8DashboardService.getHandlers() - .then(function (result) { - vm.status.Handlers = result.data; - }); - } - - function resetStatus(mode) { - vm.reported = false; - vm.working = true; - vm.runmode = mode; - vm.showAll = false; - - vm.status = { - Count: 0, - Total: 1, - Message: "Initializing", - Handlers: [] - }; - - vm.update = { - Message: "", - Count: 0, - Total: 1 - }; - - switch (mode) { - case modes.IMPORT: - vm.action = 'Import'; - break; - case mode.REPORT: - vm.action = 'Report'; - break; - case mode.EXPORT: - vm.action = 'Export'; - break; - } - } - - function getClientId() { - if ($.connection !== undefined && $.connection.hub !== undefined) { - return $.connection.hub.id; - } - - return ""; - } - - } - - angular.module('umbraco') - .controller('uSync8DashboardController', uSyncDashboardController); - -})(); \ No newline at end of file diff --git a/uSync8.Site/App_Plugins/uSync8/uSync_864.js b/uSync8.Site/App_Plugins/uSync8/uSync_864.js deleted file mode 100644 index c3adb5fd..00000000 --- a/uSync8.Site/App_Plugins/uSync8/uSync_864.js +++ /dev/null @@ -1 +0,0 @@ -// cache breaker. \ No newline at end of file diff --git a/uSync8.Site/App_Plugins/uSync8/usync_864.css b/uSync8.Site/App_Plugins/uSync8/usync_864.css deleted file mode 100644 index 28956ee7..00000000 --- a/uSync8.Site/App_Plugins/uSync8/usync_864.css +++ /dev/null @@ -1 +0,0 @@ -/* cache breaker */ \ No newline at end of file diff --git a/uSync8.Site/Global.asax b/uSync8.Site/Global.asax deleted file mode 100644 index 08312748..00000000 --- a/uSync8.Site/Global.asax +++ /dev/null @@ -1 +0,0 @@ -<%@ Application Inherits="Umbraco.Web.UmbracoApplication" Language="C#" %> diff --git a/uSync8.Site/Media/Web.config b/uSync8.Site/Media/Web.config deleted file mode 100644 index cd48da38..00000000 --- a/uSync8.Site/Media/Web.config +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/uSync8.Site/Properties/AssemblyInfo.cs b/uSync8.Site/Properties/AssemblyInfo.cs deleted file mode 100644 index 3cd9fd0b..00000000 --- a/uSync8.Site/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("uSync8.Site")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("uSync8.Site")] -[assembly: AssemblyCopyright("Copyright © 2019")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("4dc0ea5c-b104-479c-9d84-da64a039f98b")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/uSync8.Site/Views/Partials/Grid/Bootstrap3-Fluid.cshtml b/uSync8.Site/Views/Partials/Grid/Bootstrap3-Fluid.cshtml deleted file mode 100644 index defe59d8..00000000 --- a/uSync8.Site/Views/Partials/Grid/Bootstrap3-Fluid.cshtml +++ /dev/null @@ -1,88 +0,0 @@ -@inherits UmbracoViewPage -@using Umbraco.Web.Templates -@using Newtonsoft.Json.Linq - -@* - Razor helpers located at the bottom of this file -*@ - -@if (Model != null && Model.sections != null) -{ - var oneColumn = ((System.Collections.ICollection)Model.sections).Count == 1; - -
- @if (oneColumn) - { - foreach (var section in Model.sections) { -
- @foreach (var row in section.rows) { - @renderRow(row); - } -
- } - }else { -
- @foreach (var s in Model.sections) { -
-
- @foreach (var row in s.rows) { - @renderRow(row); - } -
-
- } -
- } -
-} - -@helper renderRow(dynamic row){ -
-
- @foreach ( var area in row.areas ) { -
-
- @foreach (var control in area.controls) { - if (control !=null && control.editor != null && control.editor.view != null ) { - @Html.Partial("grid/editors/base", (object)control) - } - } -
-
} -
-
-} - -@functions { - public static MvcHtmlString RenderElementAttributes(dynamic contentItem) - { - var attrs = new List(); - JObject cfg = contentItem.config; - - if(cfg != null) - foreach (JProperty property in cfg.Properties()) - { - var propertyValue = HttpUtility.HtmlAttributeEncode(property.Value.ToString()); - attrs.Add(property.Name + "=\"" + propertyValue + "\""); - } - - JObject style = contentItem.styles; - - if (style != null) { - var cssVals = new List(); - foreach (JProperty property in style.Properties()) - { - var propertyValue = property.Value.ToString(); - if (string.IsNullOrWhiteSpace(propertyValue) == false) - { - cssVals.Add(property.Name + ":" + propertyValue + ";"); - } - } - - if (cssVals.Any()) - attrs.Add("style='" + HttpUtility.HtmlAttributeEncode(string.Join(" ", cssVals)) + "'"); - } - - return new MvcHtmlString(string.Join(" ", attrs)); - } -} \ No newline at end of file diff --git a/uSync8.Site/Views/Partials/Grid/Bootstrap3.cshtml b/uSync8.Site/Views/Partials/Grid/Bootstrap3.cshtml deleted file mode 100644 index 9333628e..00000000 --- a/uSync8.Site/Views/Partials/Grid/Bootstrap3.cshtml +++ /dev/null @@ -1,88 +0,0 @@ -@inherits UmbracoViewPage -@using Umbraco.Web.Templates -@using Newtonsoft.Json.Linq - -@if (Model != null && Model.sections != null) -{ - var oneColumn = ((System.Collections.ICollection)Model.sections).Count == 1; - -
- @if (oneColumn) - { - foreach (var section in Model.sections) { -
- @foreach (var row in section.rows) { - @renderRow(row, true); - } -
- } - }else { -
-
- @foreach (var s in Model.sections) { -
-
- @foreach (var row in s.rows) { - @renderRow(row, false); - } -
-
- } -
-
- } -
-} - -@helper renderRow(dynamic row, bool singleColumn){ -
- @Html.If(singleColumn, "
") -
- @foreach ( var area in row.areas ) { -
-
- @foreach (var control in area.controls) { - if (control !=null && control.editor != null && control.editor.view != null ) { - @Html.Partial("grid/editors/base", (object)control) - } - } -
-
} -
- @Html.If(singleColumn, "
") -
-} - -@functions { - public static MvcHtmlString RenderElementAttributes(dynamic contentItem) - { - var attrs = new List(); - JObject cfg = contentItem.config; - - if(cfg != null) - foreach (JProperty property in cfg.Properties()) - { - var propertyValue = HttpUtility.HtmlAttributeEncode(property.Value.ToString()); - attrs.Add(property.Name + "=\"" + propertyValue + "\""); - } - - JObject style = contentItem.styles; - - if (style != null) { - var cssVals = new List(); - foreach (JProperty property in style.Properties()) - { - var propertyValue = property.Value.ToString(); - if (string.IsNullOrWhiteSpace(propertyValue) == false) - { - cssVals.Add(property.Name + ":" + propertyValue + ";"); - } - } - - if (cssVals.Any()) - attrs.Add("style=\"" + HttpUtility.HtmlAttributeEncode(string.Join(" ", cssVals)) + "\""); - } - - return new MvcHtmlString(string.Join(" ", attrs)); - } -} diff --git a/uSync8.Site/Views/Partials/Grid/Editors/Base.cshtml b/uSync8.Site/Views/Partials/Grid/Editors/Base.cshtml deleted file mode 100644 index a86c0481..00000000 --- a/uSync8.Site/Views/Partials/Grid/Editors/Base.cshtml +++ /dev/null @@ -1,24 +0,0 @@ -@model dynamic -@using Umbraco.Web.Templates - -@functions { - public static string EditorView(dynamic contentItem) - { - string view = contentItem.editor.render != null ? contentItem.editor.render.ToString() : contentItem.editor.view.ToString(); - view = view.ToLower().Replace(".html", ".cshtml"); - - if (!view.Contains("/")) { - view = "grid/editors/" + view; - } - - return view; - } -} -@try -{ - string editor = EditorView(Model); - @Html.Partial(editor, (object)Model) -} -catch (Exception ex) { -
@ex.ToString()
-} \ No newline at end of file diff --git a/uSync8.Site/Views/Partials/Grid/Editors/Embed.cshtml b/uSync8.Site/Views/Partials/Grid/Editors/Embed.cshtml deleted file mode 100644 index 393157bc..00000000 --- a/uSync8.Site/Views/Partials/Grid/Editors/Embed.cshtml +++ /dev/null @@ -1,7 +0,0 @@ -@model dynamic -@using Umbraco.Web.Templates - - -
- @Html.Raw(Model.value) -
diff --git a/uSync8.Site/Views/Partials/Grid/Editors/Macro.cshtml b/uSync8.Site/Views/Partials/Grid/Editors/Macro.cshtml deleted file mode 100644 index e0822808..00000000 --- a/uSync8.Site/Views/Partials/Grid/Editors/Macro.cshtml +++ /dev/null @@ -1,17 +0,0 @@ -@inherits UmbracoViewPage -@using Umbraco.Web.Templates - - -@if (Model.value != null) -{ - string macroAlias = Model.value.macroAlias.ToString(); - ViewDataDictionary parameters = new ViewDataDictionary(); - foreach (dynamic mpd in Model.value.macroParamsDictionary) - { - parameters.Add(mpd.Name, mpd.Value); - } - - - @Umbraco.RenderMacro(macroAlias, parameters) - -} diff --git a/uSync8.Site/Views/Partials/Grid/Editors/Media.cshtml b/uSync8.Site/Views/Partials/Grid/Editors/Media.cshtml deleted file mode 100644 index ea79ce41..00000000 --- a/uSync8.Site/Views/Partials/Grid/Editors/Media.cshtml +++ /dev/null @@ -1,25 +0,0 @@ -@model dynamic -@using Umbraco.Web.Templates - -@if (Model.value != null) -{ - var url = Model.value.image; - if(Model.editor.config != null && Model.editor.config.size != null){ - url += "?width=" + Model.editor.config.size.width; - url += "&height=" + Model.editor.config.size.height; - - if(Model.value.focalPoint != null){ - url += "¢er=" + Model.value.focalPoint.top +"," + Model.value.focalPoint.left; - url += "&mode=crop"; - } - } - - var altText = Model.value.altText ?? Model.value.caption ?? string.Empty; - - @altText - - if (Model.value.caption != null) - { -

@Model.value.caption

- } -} diff --git a/uSync8.Site/Views/Partials/Grid/Editors/Rte.cshtml b/uSync8.Site/Views/Partials/Grid/Editors/Rte.cshtml deleted file mode 100644 index b7e293ee..00000000 --- a/uSync8.Site/Views/Partials/Grid/Editors/Rte.cshtml +++ /dev/null @@ -1,5 +0,0 @@ -@model dynamic -@using Umbraco.Web.Composing -@using Umbraco.Web.Templates - -@Html.Raw(TemplateUtilities.ParseInternalLinks(Model.value.ToString(), Current.UmbracoContext.UrlProvider)) diff --git a/uSync8.Site/Views/Partials/Grid/Editors/Textstring.cshtml b/uSync8.Site/Views/Partials/Grid/Editors/Textstring.cshtml deleted file mode 100644 index 1001d10e..00000000 --- a/uSync8.Site/Views/Partials/Grid/Editors/Textstring.cshtml +++ /dev/null @@ -1,24 +0,0 @@ -@model dynamic -@using Umbraco.Web.Composing -@using Umbraco.Web.Templates - -@if (Model.editor.config.markup != null) -{ - string markup = Model.editor.config.markup.ToString(); - markup = markup.Replace("#value#", Html.ReplaceLineBreaksForHtml(HttpUtility.HtmlEncode((string)Model.value.ToString())).ToString()); - - if (Model.editor.config.style != null) - { - markup = markup.Replace("#style#", Model.editor.config.style.ToString()); - } - - - @Html.Raw(markup) - -} -else -{ - -
@Model.value
-
-} diff --git a/uSync8.Site/Views/aASuperSimple.cshtml b/uSync8.Site/Views/aASuperSimple.cshtml deleted file mode 100644 index dc91bfdb..00000000 --- a/uSync8.Site/Views/aASuperSimple.cshtml +++ /dev/null @@ -1,7 +0,0 @@ -@inherits Umbraco.Web.Mvc.UmbracoViewPage -@{ - Layout = "aSimpleDocType.cshtml"; -} - -@* the fun starts here *@ - diff --git a/uSync8.Site/Views/aSimpleDocType.cshtml b/uSync8.Site/Views/aSimpleDocType.cshtml deleted file mode 100644 index 82109117..00000000 --- a/uSync8.Site/Views/aSimpleDocType.cshtml +++ /dev/null @@ -1,7 +0,0 @@ -@inherits Umbraco.Web.Mvc.UmbracoViewPage -@{ - Layout = null; -} - -@* the fun starts here *@ - diff --git a/uSync8.Site/Web.Debug.config b/uSync8.Site/Web.Debug.config deleted file mode 100644 index fae9cfef..00000000 --- a/uSync8.Site/Web.Debug.config +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/uSync8.Site/Web.Release.config b/uSync8.Site/Web.Release.config deleted file mode 100644 index da6e960b..00000000 --- a/uSync8.Site/Web.Release.config +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/uSync8.Site/Web.config b/uSync8.Site/Web.config deleted file mode 100644 index 444e9e29..00000000 --- a/uSync8.Site/Web.config +++ /dev/null @@ -1,305 +0,0 @@ - - - - -
- -
-
- - - -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/uSync8.Site/config/ClientDependency.config b/uSync8.Site/config/ClientDependency.config deleted file mode 100644 index 41a3f5fe..00000000 --- a/uSync8.Site/config/ClientDependency.config +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/uSync8.Site/config/HealthChecks.config b/uSync8.Site/config/HealthChecks.config deleted file mode 100644 index 4e927e8b..00000000 --- a/uSync8.Site/config/HealthChecks.config +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/uSync8.Site/config/imageprocessor/cache.config b/uSync8.Site/config/imageprocessor/cache.config deleted file mode 100644 index 00b6dd09..00000000 --- a/uSync8.Site/config/imageprocessor/cache.config +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/uSync8.Site/config/imageprocessor/processing.config b/uSync8.Site/config/imageprocessor/processing.config deleted file mode 100644 index bb74ba02..00000000 --- a/uSync8.Site/config/imageprocessor/processing.config +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/uSync8.Site/config/imageprocessor/security.config b/uSync8.Site/config/imageprocessor/security.config deleted file mode 100644 index 3168b751..00000000 --- a/uSync8.Site/config/imageprocessor/security.config +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/uSync8.Site/config/splashes/noNodes.aspx b/uSync8.Site/config/splashes/noNodes.aspx deleted file mode 100644 index 46a27a4e..00000000 --- a/uSync8.Site/config/splashes/noNodes.aspx +++ /dev/null @@ -1,61 +0,0 @@ -<%@ Page Language="C#" AutoEventWireup="True" Inherits="Umbraco.Web.UI.Config.Splashes.NoNodes" CodeBehind="NoNodes.aspx.cs" %> -<%@ Import Namespace="Umbraco.Core.Configuration" %> -<%@ Import Namespace="Umbraco.Core.IO" %> - - - - - - - - - - - - - - - - - - - - -
-
-
- - -

Welcome to your Umbraco installation

-

You're seeing this wonderful page because your website doesn't contain any published content yet.

- - - - -
-
-

Easy start with Umbraco.tv

-

We have created a bunch of 'how-to' videos, to get you easily started with Umbraco. Learn how to build projects in just a couple of minutes. Easiest CMS in the world.

- - Umbraco.tv → -
- -
-

Be a part of the community

-

The Umbraco community is the best of its kind, be sure to visit, and if you have any questions, we're sure that you can get your answers from the community.

- - our.Umbraco → -
-
- -
-
- -
- - - - - diff --git a/uSync8.Site/config/uSync8.config b/uSync8.Site/config/uSync8.config deleted file mode 100644 index dcd69f5b..00000000 --- a/uSync8.Site/config/uSync8.config +++ /dev/null @@ -1,59 +0,0 @@ - - - - - ~/uSync/v8/ - True - False - False - True - False - False - False - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - False - False - True - - /something - - - \ No newline at end of file diff --git a/uSync8.Site/config/umbracoSettings.config b/uSync8.Site/config/umbracoSettings.config deleted file mode 100644 index 3b4d0cae..00000000 --- a/uSync8.Site/config/umbracoSettings.config +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - - - - - - - - 1 - - - - - - - - your@email.here - - - - - In Preview Mode - click to end - ]]> - - - throw - - - ashx,aspx,ascx,config,cshtml,vbhtml,asmx,air,axd,swf,xml,xhtml,html,htm,php,htaccess - - - assets/img/login.jpg - - - - - - false - - true - - false - - - - - - - - - - - - diff --git a/uSync8.Site/packages.config b/uSync8.Site/packages.config deleted file mode 100644 index f485ad9d..00000000 --- a/uSync8.Site/packages.config +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/uSync8.Site/uSync8.Site.csproj b/uSync8.Site/uSync8.Site.csproj deleted file mode 100644 index 99681dd4..00000000 --- a/uSync8.Site/uSync8.Site.csproj +++ /dev/null @@ -1,581 +0,0 @@ - - - - - - - Debug - AnyCPU - - - 2.0 - {4DC0EA5C-B104-479C-9D84-DA64A039F98B} - {349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} - Library - Properties - uSync8.Site - uSync8.Site - v4.7.2 - true - - - - - - - - - - - true - full - false - bin\ - DEBUG;TRACE - prompt - 4 - - - true - pdbonly - true - bin\ - TRACE - prompt - 4 - - - - ..\packages\AutoMapper.8.0.0\lib\net461\AutoMapper.dll - - - ..\packages\ClientDependency.1.9.7\lib\net45\ClientDependency.Core.dll - - - ..\packages\ClientDependency-Mvc5.1.8.0.0\lib\net45\ClientDependency.Core.Mvc.dll - - - ..\packages\CSharpTest.Net.Collections.14.906.1403.1082\lib\net40\CSharpTest.Net.Collections.dll - - - ..\packages\Examine.1.0.0\lib\net452\Examine.dll - - - ..\packages\HtmlAgilityPack.1.8.14\lib\Net45\HtmlAgilityPack.dll - - - ..\packages\SharpZipLib.0.86.0\lib\20\ICSharpCode.SharpZipLib.dll - - - ..\packages\ImageProcessor.2.7.0.100\lib\net452\ImageProcessor.dll - - - ..\packages\ImageProcessor.Web.4.10.0.100\lib\net452\ImageProcessor.Web.dll - - - ..\packages\LightInject.5.4.0\lib\net46\LightInject.dll - - - ..\packages\LightInject.Annotation.1.1.0\lib\net46\LightInject.Annotation.dll - - - ..\packages\LightInject.Mvc.2.0.0\lib\net46\LightInject.Mvc.dll - - - ..\packages\LightInject.Web.2.0.0\lib\net46\LightInject.Web.dll - - - ..\packages\LightInject.WebApi.2.0.0\lib\net46\LightInject.WebApi.dll - - - ..\packages\Lucene.Net.3.0.3\lib\NET40\Lucene.Net.dll - - - ..\packages\Markdown.2.2.1\lib\net451\Markdown.dll - - - ..\packages\Microsoft.AspNet.Identity.Core.2.2.2\lib\net45\Microsoft.AspNet.Identity.Core.dll - - - ..\packages\Microsoft.AspNet.Identity.Owin.2.2.2\lib\net45\Microsoft.AspNet.Identity.Owin.dll - - - ..\packages\Microsoft.AspNet.SignalR.Core.2.4.0\lib\net45\Microsoft.AspNet.SignalR.Core.dll - - - ..\packages\Microsoft.CodeAnalysis.Common.2.10.0\lib\netstandard1.3\Microsoft.CodeAnalysis.dll - - - ..\packages\Microsoft.CodeAnalysis.CSharp.2.10.0\lib\netstandard1.3\Microsoft.CodeAnalysis.CSharp.dll - - - ..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll - - - - ..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.2.0.0\lib\netstandard2.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll - - - ..\packages\Microsoft.IO.RecyclableMemoryStream.1.2.2\lib\net45\Microsoft.IO.RecyclableMemoryStream.dll - - - ..\packages\Microsoft.Owin.4.0.1\lib\net45\Microsoft.Owin.dll - - - ..\packages\Microsoft.Owin.Host.SystemWeb.4.0.1\lib\net45\Microsoft.Owin.Host.SystemWeb.dll - - - ..\packages\Microsoft.Owin.Security.4.0.1\lib\net45\Microsoft.Owin.Security.dll - - - ..\packages\Microsoft.Owin.Security.Cookies.4.0.1\lib\net45\Microsoft.Owin.Security.Cookies.dll - - - ..\packages\Microsoft.Owin.Security.OAuth.4.0.1\lib\net45\Microsoft.Owin.Security.OAuth.dll - - - ..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll - - - ..\packages\MiniProfiler.4.0.138\lib\net461\MiniProfiler.dll - - - ..\packages\MiniProfiler.Shared.4.0.138\lib\net461\MiniProfiler.Shared.dll - - - ..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll - - - ..\packages\NPoco.3.9.4\lib\net45\NPoco.dll - - - ..\packages\Our.Umbraco.DocTypeGridEditor.1.0.0\lib\net45\Our.Umbraco.DocTypeGridEditor.dll - - - ..\packages\Owin.1.0\lib\net40\Owin.dll - - - ..\packages\Semver.2.0.4\lib\net452\Semver.dll - - - ..\packages\Serilog.2.8.0\lib\net46\Serilog.dll - - - ..\packages\Serilog.Enrichers.Process.2.0.1\lib\net45\Serilog.Enrichers.Process.dll - - - ..\packages\Serilog.Enrichers.Thread.3.0.0\lib\net45\Serilog.Enrichers.Thread.dll - - - ..\packages\Serilog.Filters.Expressions.2.0.0\lib\net45\Serilog.Filters.Expressions.dll - - - ..\packages\Serilog.Formatting.Compact.1.0.0\lib\net45\Serilog.Formatting.Compact.dll - - - ..\packages\Serilog.Formatting.Compact.Reader.1.0.3\lib\net45\Serilog.Formatting.Compact.Reader.dll - - - ..\packages\Serilog.Settings.AppSettings.2.2.2\lib\net45\Serilog.Settings.AppSettings.dll - - - ..\packages\Serilog.Sinks.Async.1.3.0\lib\net45\Serilog.Sinks.Async.dll - - - ..\packages\Serilog.Sinks.File.4.0.0\lib\net45\Serilog.Sinks.File.dll - - - ..\packages\Serilog.Sinks.Map.1.0.0\lib\netstandard2.0\Serilog.Sinks.Map.dll - - - ..\packages\Superpower.2.0.0\lib\net45\Superpower.dll - - - ..\packages\System.AppContext.4.3.0\lib\net463\System.AppContext.dll - True - True - - - ..\packages\System.Collections.Immutable.1.5.0\lib\netstandard2.0\System.Collections.Immutable.dll - - - - ..\packages\System.Console.4.3.0\lib\net46\System.Console.dll - True - True - - - - ..\packages\Umbraco.SqlServerCE.4.0.0.1\lib\net472\System.Data.SqlServerCe.dll - - - ..\packages\Umbraco.SqlServerCE.4.0.0.1\lib\net472\System.Data.SqlServerCe.Entity.dll - - - ..\packages\System.Diagnostics.DiagnosticSource.4.4.1\lib\net46\System.Diagnostics.DiagnosticSource.dll - - - ..\packages\System.Diagnostics.FileVersionInfo.4.3.0\lib\net46\System.Diagnostics.FileVersionInfo.dll - True - True - - - ..\packages\System.Diagnostics.StackTrace.4.3.0\lib\net46\System.Diagnostics.StackTrace.dll - True - True - - - ..\packages\System.IO.4.3.0\lib\net462\System.IO.dll - True - True - - - ..\packages\System.IO.Compression.4.3.0\lib\net46\System.IO.Compression.dll - True - True - - - ..\packages\System.IO.FileSystem.4.3.0\lib\net46\System.IO.FileSystem.dll - True - True - - - ..\packages\System.IO.FileSystem.Primitives.4.3.0\lib\net46\System.IO.FileSystem.Primitives.dll - True - True - - - ..\packages\System.Linq.4.3.0\lib\net463\System.Linq.dll - True - True - - - ..\packages\System.Linq.Expressions.4.3.0\lib\net463\System.Linq.Expressions.dll - True - True - - - - ..\packages\Microsoft.AspNet.WebApi.Client.5.2.7\lib\net45\System.Net.Http.Formatting.dll - - - - ..\packages\System.Reflection.4.3.0\lib\net462\System.Reflection.dll - True - True - - - ..\packages\System.Reflection.Metadata.1.6.0\lib\netstandard2.0\System.Reflection.Metadata.dll - - - ..\packages\System.Runtime.4.3.0\lib\net462\System.Runtime.dll - True - True - - - - ..\packages\System.Runtime.Extensions.4.3.0\lib\net462\System.Runtime.Extensions.dll - True - True - - - ..\packages\System.Runtime.InteropServices.4.3.0\lib\net463\System.Runtime.InteropServices.dll - True - True - - - - - ..\packages\System.Security.Cryptography.Algorithms.4.3.0\lib\net463\System.Security.Cryptography.Algorithms.dll - True - True - - - ..\packages\System.Security.Cryptography.Encoding.4.3.0\lib\net46\System.Security.Cryptography.Encoding.dll - True - True - - - ..\packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll - True - True - - - ..\packages\System.Security.Cryptography.X509Certificates.4.3.0\lib\net461\System.Security.Cryptography.X509Certificates.dll - True - True - - - ..\packages\System.Text.Encoding.CodePages.4.3.0\lib\net46\System.Text.Encoding.CodePages.dll - - - - ..\packages\System.Threading.Tasks.Dataflow.4.9.0\lib\netstandard2.0\System.Threading.Tasks.Dataflow.dll - - - ..\packages\System.Threading.Tasks.Extensions.4.3.0\lib\portable-net45+win8+wp8+wpa81\System.Threading.Tasks.Extensions.dll - - - ..\packages\System.Threading.Thread.4.3.0\lib\net46\System.Threading.Thread.dll - True - True - - - - ..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll - - - - - - - - - - - - ..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.Helpers.dll - - - ..\packages\Microsoft.AspNet.WebApi.Core.5.2.7\lib\net45\System.Web.Http.dll - - - ..\packages\Microsoft.AspNet.WebApi.WebHost.5.2.7\lib\net45\System.Web.Http.WebHost.dll - - - ..\packages\Microsoft.AspNet.Mvc.5.2.7\lib\net45\System.Web.Mvc.dll - - - ..\packages\Microsoft.AspNet.Razor.3.2.7\lib\net45\System.Web.Razor.dll - - - ..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.dll - - - ..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.Deployment.dll - - - ..\packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.Razor.dll - - - - - - - - - - ..\packages\System.Xml.ReaderWriter.4.3.0\lib\net46\System.Xml.ReaderWriter.dll - True - True - - - ..\packages\System.Xml.XmlDocument.4.3.0\lib\net46\System.Xml.XmlDocument.dll - True - True - - - ..\packages\System.Xml.XPath.4.3.0\lib\net46\System.Xml.XPath.dll - True - True - - - ..\packages\System.Xml.XPath.XDocument.4.3.0\lib\net46\System.Xml.XPath.XDocument.dll - True - True - - - ..\packages\UmbracoCms.Core.8.1.1\lib\net472\Umbraco.Core.dll - - - ..\packages\UmbracoCms.Web.8.1.1\lib\net472\Umbraco.Examine.dll - - - ..\packages\Umbraco.ModelsBuilder.8.1.0\lib\net472\Umbraco.ModelsBuilder.dll - - - ..\packages\UmbracoCms.Web.8.1.1\lib\net472\Umbraco.Web.dll - - - ..\packages\UmbracoCms.Web.8.1.1\lib\net472\Umbraco.Web.UI.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Designer - - - - - - - - - - - - - Designer - - - - - - - - - - - - - - - Designer - - - - - - - - - - - - - - Web.config - - - Web.config - - - - - - - - - {6d3b59c1-7a78-43bb-a806-f826fd4477f6} - uSync.Commands - - - {7ca1a210-6cb6-4568-9237-62c678877934} - uSync.Console - - - {6d7486dc-0b84-4914-9c01-297467a6b706} - uSync.TemplateTracker - - - {f2dfcb19-c9ee-471e-b8e2-e0b4dd31761d} - uSync8.BackOffice - - - {0813d306-4e5a-4e9d-b8d0-3f257cae8fa2} - uSync8.Community.Contrib - - - {a0b9c603-a7dc-4593-8059-19ba035e5cc3} - uSync8.Community.DataTypeSerializers - - - {875ecd47-2dce-475a-bddd-3b578a832419} - uSync8.ContentEdition - - - {b3afc1f9-9398-4d8e-be98-1c78bab20ec9} - uSync8.EventTriggers - - - - - 10.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - true - bin\ - TRACE - true - pdbonly - AnyCPU - prompt - MinimumRecommendedRules.ruleset - - - - - - - - - True - True - 49843 - / - http://localhost:50130/ - False - False - - - False - - - - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - - - \ No newline at end of file diff --git a/uSync8.sln b/uSync8.sln deleted file mode 100644 index 40470838..00000000 --- a/uSync8.sln +++ /dev/null @@ -1,118 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.28803.352 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "uSync8.Core", "uSync8.Core\uSync8.Core.csproj", "{79011408-C423-479F-9B0A-8DA465DE92EB}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "uSync8.BackOffice", "uSync8.BackOffice\uSync8.BackOffice.csproj", "{F2DFCB19-C9EE-471E-B8E2-E0B4DD31761D}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SolutionFiles", "SolutionFiles", "{6E911B34-61DC-471A-9AD7-97A74E9B3BE5}" - ProjectSection(SolutionItems) = preProject - Dist\betaBuild.cmd = Dist\betaBuild.cmd - Dist\createpackages.cmd = Dist\createpackages.cmd - gulpfile.js = gulpfile.js - .github\workflows\main.yml = .github\workflows\main.yml - Dist\package.cmd = Dist\package.cmd - Dist\package.ContentEdition.xml = Dist\package.ContentEdition.xml - Dist\package.xml = Dist\package.xml - Dist\pre-release.md = Dist\pre-release.md - readme-content.txt = readme-content.txt - readme.txt = readme.txt - Dist\single.cmd = Dist\single.cmd - EndProjectSection -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "uSync8.ContentEdition", "uSync8.ContentEdition\uSync8.ContentEdition.csproj", "{875ECD47-2DCE-475A-BDDD-3B578A832419}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "uSync8.Site", "uSync8.Site\uSync8.Site.csproj", "{4DC0EA5C-B104-479C-9D84-DA64A039F98B}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "uSync8.Community.DataTypeSerializers", "uSync8.Community.DataTypeSerializers\uSync8.Community.DataTypeSerializers.csproj", "{A0B9C603-A7DC-4593-8059-19BA035E5CC3}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "uSync8.Community.Contrib", "uSync8.Community.Contrib\uSync8.Community.Contrib.csproj", "{0813D306-4E5A-4E9D-B8D0-3F257CAE8FA2}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "uSync8.EventTriggers", "uSync8.EventTriggers\uSync8.EventTriggers.csproj", "{B3AFC1F9-9398-4D8E-BE98-1C78BAB20EC9}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "uSync.TemplateTracker", "uSync.TemplateTracker\uSync.TemplateTracker.csproj", "{6D7486DC-0B84-4914-9C01-297467A6B706}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "uSync.Console", "uSync.Console\uSync.Console.csproj", "{7CA1A210-6CB6-4568-9237-62C678877934}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Console", "Console", "{F098B1F3-A907-4275-A831-CDBEFA6DD352}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "uSync.Commands", "uSync.Commands\uSync.Commands.csproj", "{6D3B59C1-7A78-43BB-A806-F826FD4477F6}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - PackageOnlyBuild|Any CPU = PackageOnlyBuild|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {79011408-C423-479F-9B0A-8DA465DE92EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {79011408-C423-479F-9B0A-8DA465DE92EB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {79011408-C423-479F-9B0A-8DA465DE92EB}.PackageOnlyBuild|Any CPU.ActiveCfg = PackageOnlyBuild|Any CPU - {79011408-C423-479F-9B0A-8DA465DE92EB}.PackageOnlyBuild|Any CPU.Build.0 = PackageOnlyBuild|Any CPU - {79011408-C423-479F-9B0A-8DA465DE92EB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {79011408-C423-479F-9B0A-8DA465DE92EB}.Release|Any CPU.Build.0 = Release|Any CPU - {F2DFCB19-C9EE-471E-B8E2-E0B4DD31761D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F2DFCB19-C9EE-471E-B8E2-E0B4DD31761D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F2DFCB19-C9EE-471E-B8E2-E0B4DD31761D}.PackageOnlyBuild|Any CPU.ActiveCfg = PackageOnlyBuild|Any CPU - {F2DFCB19-C9EE-471E-B8E2-E0B4DD31761D}.PackageOnlyBuild|Any CPU.Build.0 = PackageOnlyBuild|Any CPU - {F2DFCB19-C9EE-471E-B8E2-E0B4DD31761D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F2DFCB19-C9EE-471E-B8E2-E0B4DD31761D}.Release|Any CPU.Build.0 = Release|Any CPU - {875ECD47-2DCE-475A-BDDD-3B578A832419}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {875ECD47-2DCE-475A-BDDD-3B578A832419}.Debug|Any CPU.Build.0 = Debug|Any CPU - {875ECD47-2DCE-475A-BDDD-3B578A832419}.PackageOnlyBuild|Any CPU.ActiveCfg = PackageOnlyBuild|Any CPU - {875ECD47-2DCE-475A-BDDD-3B578A832419}.PackageOnlyBuild|Any CPU.Build.0 = PackageOnlyBuild|Any CPU - {875ECD47-2DCE-475A-BDDD-3B578A832419}.Release|Any CPU.ActiveCfg = Release|Any CPU - {875ECD47-2DCE-475A-BDDD-3B578A832419}.Release|Any CPU.Build.0 = Release|Any CPU - {4DC0EA5C-B104-479C-9D84-DA64A039F98B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4DC0EA5C-B104-479C-9D84-DA64A039F98B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4DC0EA5C-B104-479C-9D84-DA64A039F98B}.PackageOnlyBuild|Any CPU.ActiveCfg = PackageOnlyBuild|Any CPU - {4DC0EA5C-B104-479C-9D84-DA64A039F98B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4DC0EA5C-B104-479C-9D84-DA64A039F98B}.Release|Any CPU.Build.0 = Release|Any CPU - {A0B9C603-A7DC-4593-8059-19BA035E5CC3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A0B9C603-A7DC-4593-8059-19BA035E5CC3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A0B9C603-A7DC-4593-8059-19BA035E5CC3}.PackageOnlyBuild|Any CPU.ActiveCfg = PackageOnlyBuild|Any CPU - {A0B9C603-A7DC-4593-8059-19BA035E5CC3}.PackageOnlyBuild|Any CPU.Build.0 = PackageOnlyBuild|Any CPU - {A0B9C603-A7DC-4593-8059-19BA035E5CC3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A0B9C603-A7DC-4593-8059-19BA035E5CC3}.Release|Any CPU.Build.0 = Release|Any CPU - {0813D306-4E5A-4E9D-B8D0-3F257CAE8FA2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0813D306-4E5A-4E9D-B8D0-3F257CAE8FA2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0813D306-4E5A-4E9D-B8D0-3F257CAE8FA2}.PackageOnlyBuild|Any CPU.ActiveCfg = PackageOnlyBuild|Any CPU - {0813D306-4E5A-4E9D-B8D0-3F257CAE8FA2}.PackageOnlyBuild|Any CPU.Build.0 = PackageOnlyBuild|Any CPU - {0813D306-4E5A-4E9D-B8D0-3F257CAE8FA2}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0813D306-4E5A-4E9D-B8D0-3F257CAE8FA2}.Release|Any CPU.Build.0 = Release|Any CPU - {B3AFC1F9-9398-4D8E-BE98-1C78BAB20EC9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B3AFC1F9-9398-4D8E-BE98-1C78BAB20EC9}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B3AFC1F9-9398-4D8E-BE98-1C78BAB20EC9}.PackageOnlyBuild|Any CPU.ActiveCfg = Release|Any CPU - {B3AFC1F9-9398-4D8E-BE98-1C78BAB20EC9}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B3AFC1F9-9398-4D8E-BE98-1C78BAB20EC9}.Release|Any CPU.Build.0 = Release|Any CPU - {6D7486DC-0B84-4914-9C01-297467A6B706}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6D7486DC-0B84-4914-9C01-297467A6B706}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6D7486DC-0B84-4914-9C01-297467A6B706}.PackageOnlyBuild|Any CPU.ActiveCfg = Release|Any CPU - {6D7486DC-0B84-4914-9C01-297467A6B706}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6D7486DC-0B84-4914-9C01-297467A6B706}.Release|Any CPU.Build.0 = Release|Any CPU - {7CA1A210-6CB6-4568-9237-62C678877934}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7CA1A210-6CB6-4568-9237-62C678877934}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7CA1A210-6CB6-4568-9237-62C678877934}.PackageOnlyBuild|Any CPU.ActiveCfg = PackageOnlyBuild|Any CPU - {7CA1A210-6CB6-4568-9237-62C678877934}.PackageOnlyBuild|Any CPU.Build.0 = PackageOnlyBuild|Any CPU - {7CA1A210-6CB6-4568-9237-62C678877934}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7CA1A210-6CB6-4568-9237-62C678877934}.Release|Any CPU.Build.0 = Release|Any CPU - {6D3B59C1-7A78-43BB-A806-F826FD4477F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6D3B59C1-7A78-43BB-A806-F826FD4477F6}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6D3B59C1-7A78-43BB-A806-F826FD4477F6}.PackageOnlyBuild|Any CPU.ActiveCfg = PackageOnlyBuild|Any CPU - {6D3B59C1-7A78-43BB-A806-F826FD4477F6}.PackageOnlyBuild|Any CPU.Build.0 = PackageOnlyBuild|Any CPU - {6D3B59C1-7A78-43BB-A806-F826FD4477F6}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6D3B59C1-7A78-43BB-A806-F826FD4477F6}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {7CA1A210-6CB6-4568-9237-62C678877934} = {F098B1F3-A907-4275-A831-CDBEFA6DD352} - {6D3B59C1-7A78-43BB-A806-F826FD4477F6} = {F098B1F3-A907-4275-A831-CDBEFA6DD352} - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {6168BC64-BBC4-4FEC-B81D-29A386660009} - EndGlobalSection -EndGlobal diff --git a/uSyncCore.sln b/uSyncCore.sln new file mode 100644 index 00000000..3add5c5a --- /dev/null +++ b/uSyncCore.sln @@ -0,0 +1,49 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30413.136 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "uSync.Core", "uSync.Core\uSync.Core.csproj", "{0B78DBEC-DB41-42F8-AAA8-92DE7934C411}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "uSync.BackOffice", "uSync.BackOffice\uSync.BackOffice.csproj", "{31B4979B-EF3A-4A11-8C6B-6E13C96DADB3}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "uSync.ContentEdition", "uSync.ContentEdition\uSync.ContentEdition.csproj", "{D89624BE-01F2-406E-AC3C-676AFE56CFA0}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "uSync.Community.Contrib", "uSync.Community.Contrib\uSync.Community.Contrib.csproj", "{195AFC46-80AF-4C46-A255-9B298E3CDF08}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "uSync.Site", "uSync.Site\uSync.Site.csproj", "{CAAFABF8-12F0-42BB-80CA-D11D5B80D022}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {0B78DBEC-DB41-42F8-AAA8-92DE7934C411}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0B78DBEC-DB41-42F8-AAA8-92DE7934C411}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0B78DBEC-DB41-42F8-AAA8-92DE7934C411}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0B78DBEC-DB41-42F8-AAA8-92DE7934C411}.Release|Any CPU.Build.0 = Release|Any CPU + {31B4979B-EF3A-4A11-8C6B-6E13C96DADB3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {31B4979B-EF3A-4A11-8C6B-6E13C96DADB3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {31B4979B-EF3A-4A11-8C6B-6E13C96DADB3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {31B4979B-EF3A-4A11-8C6B-6E13C96DADB3}.Release|Any CPU.Build.0 = Release|Any CPU + {D89624BE-01F2-406E-AC3C-676AFE56CFA0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D89624BE-01F2-406E-AC3C-676AFE56CFA0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D89624BE-01F2-406E-AC3C-676AFE56CFA0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D89624BE-01F2-406E-AC3C-676AFE56CFA0}.Release|Any CPU.Build.0 = Release|Any CPU + {195AFC46-80AF-4C46-A255-9B298E3CDF08}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {195AFC46-80AF-4C46-A255-9B298E3CDF08}.Debug|Any CPU.Build.0 = Debug|Any CPU + {195AFC46-80AF-4C46-A255-9B298E3CDF08}.Release|Any CPU.ActiveCfg = Release|Any CPU + {195AFC46-80AF-4C46-A255-9B298E3CDF08}.Release|Any CPU.Build.0 = Release|Any CPU + {CAAFABF8-12F0-42BB-80CA-D11D5B80D022}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CAAFABF8-12F0-42BB-80CA-D11D5B80D022}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CAAFABF8-12F0-42BB-80CA-D11D5B80D022}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CAAFABF8-12F0-42BB-80CA-D11D5B80D022}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {F3CFCE6C-BE49-42B5-A11D-C05CF7B6D54C} + EndGlobalSection +EndGlobal