Coder Social home page Coder Social logo

usync.commandline's Introduction

uSync Command Line library

The uSync command line library has two parts

uSync command line

the uSync command line is a dotnet tool that you install locally (or in your CI/CD pipeline!). to run commands remotely against an umbraco site.

dotnet tool install uSync.Cli -g

when the tool is installed (and the Umbraco site is configured) you can run remote commands against the Umbrac site.

for example

uSync run info -s http://localhost:44382/umbraco -user <username> -pass <password>

Will return information about your site

{
  "version": "10.2.0",
  "level": "Run",
  "role": 1,
  "servers": "https://localhost:44382/",
  "environment": "Development",
  "applicatioName": "uSync.Site",
  "contentRootPath": "C:\\Source\\Testings\\uSync.CommandLine\\uSync.Site"
}

uSync Command Library (for Umbraco)

In-order for the uSync command line to successfully connect with a site - that site needs to have the uSync command library installed and configured

dotnet install package uSync.Commands

by default the command line is disabeld you need to turn it on for the authentication methods you wish to use.

"uSync": {
  "Commands": {
    "Enabled": "hmac,basic",
    "key": "HMAC-KEY-VALUE",
    "UserId" : -1
  }
}

.. see uSync.Commands.Server readme for details.

usync.commandline's People

Contributors

carlsargunar avatar jrunestone avatar kevinjump avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

usync.commandline's Issues

Question in Status

uSyncTriggers is a very helpful tool for our CI stack. Is this new project ready to replace uSyncTriggers? If so, will the current version (v10,0,4) work with Umbraco/uSync v12. Thanks

Requirements?

Is the .NET SDK or something else required to use this? (It installs and runs fine on my local dev PC but I have all sorts of runtimes and SDKs installed locally.

I have the .NET 6 runtimes installed:

PS C:\Users\Administrator\Downloads> dotnet --list-runtimes
Microsoft.AspNetCore.App 6.0.21 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.21 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 6.0.21 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
PS C:\Users\Administrator\Downloads> dotnet tool install --global uSync.Cli
The command could not be loaded, possibly because:
  * You intended to execute a .NET application:
      The application 'tool' does not exist.
  * You intended to execute a .NET SDK command:
      No .NET SDKs were found.

Download a .NET SDK:
https://aka.ms/dotnet-download

Learn about SDK resolution:
https://aka.ms/dotnet/sdk-not-found

I installed the latest .NET SDK and get a different error:

PS C:\Users\Administrator\Downloads> dotnet tool install --global uSync.Cli
C:\Users\Administrator\AppData\Local\Temp\5\c641b644-0293-4e14-9d7c-1453693444b4\restore.csproj : error NU1100: Unable
to resolve 'usync.cli (>= 0.0.0)' for 'net6.0'.
C:\Users\Administrator\AppData\Local\Temp\5\c641b644-0293-4e14-9d7c-1453693444b4\restore.csproj : error NU1100: Unable
to resolve 'usync.cli (>= 0.0.0)' for 'net6.0/any'.
The tool package could not be restored.
Tool 'usync.cli' failed to install. This failure may have been caused by:

* You are attempting to install a preview release and did not use the --version option to specify the version.
* A package by this name was found, but it was not a .NET tool.
* The required NuGet feed cannot be accessed, perhaps because of an Internet connection problem.
* You mistyped the name of the tool.

For more reasons, including package naming enforcement, visit https://aka.ms/failure-installing-tool
PS C:\Users\Administrator\Downloads>

Any ideas?

PS C:\Users\Administrator\Downloads> dotnet --list-sdks
6.0.413 [C:\Program Files\dotnet\sdk]
PS C:\Users\Administrator\Downloads> dotnet --list-runtimes
Microsoft.AspNetCore.App 6.0.21 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.21 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 6.0.21 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
PS C:\Users\Administrator\Downloads>

Support for Umbraco 13?

Hello, is there any way to get support for Umbraco 13?

When I try to launch my v13 (upgrade from v10) project, I an error at this point in Startup.cs

        public void ConfigureServices(IServiceCollection services)
        {
            services.AddUmbraco(_env, _config)
                .AddBackOffice()
                .AddWebsite()
                .AddComposers()
                .Build();

And the error is:

System.Reflection.ReflectionTypeLoadException
  HResult=0x80131602
  Message=Could not load all types from "uSync.Commands, Version=10.0.4.0, Culture=neutral, PublicKeyToken=null" due to LoaderExceptions, skipping:
. System.TypeLoadException on uSync.BackOffice.Controllers.SyncActionResult: Could not load type 'uSync.BackOffice.Controllers.SyncActionResult' from assembly 'uSync.BackOffice, Version=13.1.0.0, Culture=neutral, PublicKeyToken=null'.
. System.TypeLoadException on uSync.BackOffice.Controllers.SyncActionResult: Could not load type 'uSync.BackOffice.Controllers.SyncActionResult' from assembly 'uSync.BackOffice, Version=13.1.0.0, Culture=neutral, PublicKeyToken=null'.
. System.TypeLoadException on uSync.BackOffice.Controllers.SyncActionResult: Could not load type 'uSync.BackOffice.Controllers.SyncActionResult' from assembly 'uSync.BackOffice, Version=13.1.0.0, Culture=neutral, PublicKeyToken=null'.
. System.TypeLoadException on uSync.BackOffice.Controllers.SyncActionResult: Could not load type 'uSync.BackOffice.Controllers.SyncActionResult' from assembly 'uSync.BackOffice, Version=13.1.0.0, Culture=neutral, PublicKeyToken=null'.

Could not load type 'uSync.BackOffice.Controllers.SyncActionResult' from assembly 'uSync.BackOffice, Version=13.1.0.0, Culture=neutral, PublicKeyToken=null'.
Could not load type 'uSync.BackOffice.Controllers.SyncActionResult' from assembly 'uSync.BackOffice, Version=13.1.0.0, Culture=neutral, PublicKeyToken=null'.
Could not load type 'uSync.BackOffice.Controllers.SyncActionResult' from assembly 'uSync.BackOffice, Version=13.1.0.0, Culture=neutral, PublicKeyToken=null'.
Could not load type 'uSync.BackOffice.Controllers.SyncActionResult' from assembly 'uSync.BackOffice, Version=13.1.0.0, Culture=neutral, PublicKeyToken=null'.
  Source=Umbraco.Core
  StackTrace:
   at Umbraco.Cms.Core.Composing.TypeFinder.GetTypesWithFormattedException(Assembly a)
   at Umbraco.Cms.Core.Composing.TypeFinder.GetClassesWithBaseType(Type baseType, IEnumerable`1 assemblies, Boolean onlyConcreteClasses, Func`2 additionalFilter)
   at Umbraco.Cms.Core.Composing.TypeFinder.FindClassesOfType(Type assignTypeFrom, IEnumerable`1 assemblies, Boolean onlyConcreteClasses)
   at Umbraco.Extensions.TypeFinderExtensions.FindClassesOfType[T](ITypeFinder typeFinder, IEnumerable`1 assemblies, Boolean onlyConcreteClasses)
   at Umbraco.Cms.Core.Composing.TypeLoader.<>c__DisplayClass21_0`1.<GetTypes>b__0()
   at Umbraco.Cms.Core.Composing.TypeLoader.GetTypesInternalLocked(Type baseType, Type attributeType, Func`1 finder, String action, Boolean cache)
   at Umbraco.Cms.Core.Composing.TypeLoader.GetTypesInternal(Type baseType, Type attributeType, Func`1 finder, String action, Boolean cache)
   at Umbraco.Cms.Core.Composing.TypeLoader.GetTypes[T](Boolean cache, IEnumerable`1 specificAssemblies)
   at Umbraco.Cms.Core.DependencyInjection.UmbracoBuilderExtensions.AddAllCoreCollectionBuilders(IUmbracoBuilder builder)
   at Umbraco.Cms.Core.DependencyInjection.UmbracoBuilder.AddCoreServices()
   at Umbraco.Cms.Core.DependencyInjection.UmbracoBuilder..ctor(IServiceCollection services, IConfiguration config, TypeLoader typeLoader, ILoggerFactory loggerFactory, IProfiler profiler, AppCaches appCaches, IHostingEnvironment hostingEnvironment)
   at Umbraco.Extensions.UmbracoBuilderExtensions.AddUmbraco(IServiceCollection services, IWebHostEnvironment webHostEnvironment, IConfiguration config)
   at UmbracoProject.Startup.ConfigureServices(IServiceCollection services) in C:\Users\{redacted}\Documents\Git\UmbracoProject\UmbracoProject\Startup.cs:line 44
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span`1 copyOfArgs, BindingFlags invokeAttr)
   at System.Reflection.MethodBaseInvoker.InvokeWithOneArg(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.InvokeCore(Object instance, IServiceCollection services)
   at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.UseStartup(Type startupType, HostBuilderContext context, IServiceCollection services, Object instance)
   at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.<>c__DisplayClass7_0.<UseStartup>b__0(HostBuilderContext context, IServiceCollection services)
   at Microsoft.Extensions.Hosting.HostBuilder.InitializeServiceProvider()
   at Microsoft.Extensions.Hosting.HostBuilder.Build()
   at Umbraco.Cms.Web.Common.Hosting.UmbracoHostBuilderDecorator.Build()
   at UmbracoProject.Program.Main(String[] args) in C:\Users\{redacted}\Documents\Git\UmbracoProject\UmbracoProject\Program.cs:line 6

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.