Giter VIP home page Giter VIP logo

cli's Introduction

Welcome to the DynamicWeb Community Hub

Here you have the chance to influence the future direction of DynamicWeb. To do this you can go to the Issues tab and submit your wishes and ideas for new functionality in DynamicWeb or Swift.

Before submitting a feature request

If you are unsure if the functionality you are requesting is already available, please consult the DynamicWeb documentation.

Try to see if the wish/idea has already been submitted by someone else, by using the search functionality inside the Issues tab.

Up-voting a Feature Request

If you see a feature request that you also belive is a good idea, then you can upvote that feature request using the +1/"๐Ÿ‘" reaction to the issue description. If the feature request has enough upvotes we will look into the idea and potentially add it to the backlog.

cli's People

Contributors

frederik5480 avatar nicped avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

justdynamics

cli's Issues

Option "raw" does nothing and acts like it's not specified

According to the docs, specifying --raw should keep the zip file and not extract the data. However, it seems that raw isn't implemented yet. I checked files.js and it only contains a reference to raw when setting up the parameter.

I ran the following command:

dw files templates ./templates -fre --raw

Actual results
ZIP is downloaded, extracted to ./templates and then the zip is deleted

Expected results
ZIP is downloaded and not deleted. Files are not extracted to ./templates

Installation guide is missing step to install yargs

When you follow the docs at https://github.com/dynamicweb/CLI on a machine without yargs you'll get an error when running the dw help command:

node:internal/errors:464
ErrorCaptureStackTrace(err);
^

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'yargs' imported from D:\Projects\Dynamicweb\Cli\bin\index.js
โ†[90m at new NodeError (node:internal/errors:371:5)โ†[39m
โ†[90m at packageResolve (node:internal/modules/esm/resolve:884:9)โ†[39m
โ†[90m at moduleResolve (node:internal/modules/esm/resolve:929:18)โ†[39m
โ†[90m at defaultResolve (node:internal/modules/esm/resolve:1044:11)โ†[39m
โ†[90m at ESMLoader.resolve (node:internal/modules/esm/loader:422:30)โ†[39m
โ†[90m at ESMLoader.getModuleJob (node:internal/modules/esm/loader:222:40)โ†[39m
โ†[90m at ModuleWrap. (node:internal/modules/esm/module_job:76:40)โ†[39m
โ†[90m at link (node:internal/modules/esm/module_job:75:36)โ†[39m {
code: โ†[32m'ERR_MODULE_NOT_FOUND'โ†[39m
}

This can be fixed by running:

npm i yargs

Can this be added to the manual? More details here: https://doc.dynamicweb.com/forum?PID=1605&ThreadID=84233

Imar

Command PageCopy throws an error

I am trying to copy a page with ID 150 as a child of another page with ID 149 using this command:

dw command PageCopy --json '{ "SourcePageId": 150, "DestinationParentPageId": 149 }'

Expected results:
The page is copied successfully

Actual results:
An error is displayed at the command line:

undefined:1
'{
^

SyntaxError: Unexpected token ' in JSON at position 0
at JSON.parse ()
at parseJsonOrPath (file:///D:/Projects/Dynamicweb/Cli/bin/commands/command.js:75:21)
at handleCommand (file:///D:/Projects/Dynamicweb/Cli/bin/commands/command.js:44:88)

Cannot delete a page using the PageDelete command

I am trying to delete a page using the following command:

dw command PageDelete --id 1714

Expected results
The page is deleted

Actual results:
An error is displayed at the console:
Error when doing request https://localhost:44360/Admin/Api/PageDelete?Command.id=1714
{
status: 'error',
message: 'The input does not contain any JSON tokens. Expected the input to start with a valid JSON token, when isFinalBlock is true. Path: $ | LineNumber: 0 | BytePositionInLine: 0.',
exception: 'System.Text.Json.JsonException: The input does not contain any JSON tokens. Expected the input to start with a valid JSON token, when isFinalBlock is true. Path: $ | LineNumber: 0 | BytePositionInLine: 0.\r\n' +
' ---> System.Text.Json.JsonReaderException: The input does not contain any JSON tokens. Expected the input to start with a valid JSON token, when isFinalBlock is true. LineNumber: 0 | BytePositionInLine: 0.\r\n' +
' at System.Text.Json.ThrowHelper.ThrowJsonReaderException(Utf8JsonReader& json, ExceptionResource resource, Byte nextByte, ReadOnlySpan1 bytes)\r\n' + ' at System.Text.Json.Utf8JsonReader.Read()\r\n' + ' at System.Text.Json.Serialization.JsonConverter1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)\r\n' +
' --- End of inner exception stack trace ---\r\n' +
' at System.Text.Json.ThrowHelper.ReThrowWithPath(ReadStack& state, JsonReaderException ex)\r\n' +
' at System.Text.Json.Serialization.JsonConverter1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)\r\n' + ' at System.Text.Json.Serialization.JsonConverter1.ReadCoreAsObject(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)\r\n' +
' at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan1 utf8Json, JsonTypeInfo jsonTypeInfo, Nullable1 actualByteCount)\r\n' +
' at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan`1 json, JsonTypeInfo jsonTypeInfo)\r\n' +
' at System.Text.Json.JsonSerializer.Deserialize(String json, Type returnType, JsonSerializerOptions options)\r\n' +
' at Dynamicweb.Management.Api.Controllers.Api.DataController.GetCommandResult(Type commandType, Type queryType, Object body)\r\n' +
' at Dynamicweb.Management.Api.Controllers.Api.DataController.Post(String command, Object body)',
model: null,
modelIdentifier: null,
resultActions: []
}

Swift command (and maybe others) don't handle paths with spaces

I am trying to get the latest Swift files intro a folder containing a space. I execute this command:

dw swift "D:\Some Path" # Note the double quotes around the path

Expected results:
Files and folders are stored under "D:\Some Path"

Actual results:
Files and folders are stored under "D:\Some"

Tested against today's latest version of the CLI and DW 10 Alpha 8

Can't download files

It seems that the download option is not working or not doing the right thing. I am trying to export the entire system folder to a local folder.

This works:
dw files -l system #shows all first level folders under system
dw files -lf system #shows all first level folders under system and their direct files
dw files -lfr system #shows all folders and files recursively

However, these don't work:
dw files -fre system # doesn't download even though e is set. Error: No files found in directory 'system', if you want to download all folders recursively include the -r flag
dw files -fre system system #same as previous
dw files -fre system "D:\Some\system" #same as previous

It seems that -e with and without -r just doesn't seem to do anything

login password with !

It seems a dw login for a user with a password including ! fails, not sure if it might apply to other characters as well.

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.