8.x-1.3, 5/3/2021
Requires PHP 7.2+, Drupal 8.7+, and FolderShare 8.x-1.4+
Important changes:
- The module requires at least the 8.x-1.4 release of FolderShare.
- REST protocol updated to 1.2.
- REST client updated to support protocol 1.2. New client is not compatible with old module and protocol version.
Services
New features:
- REST "get-configuration" response includes user information.
- Like most REST requests, the "get-configuration" request now returns
the user's ID, account name, and display name.
Bugs fixed:
- FALSE, zero, and empty value fields are improperly returned.
- Fixed. When the REST client requests the values for file or folder
fields that contain zero, FALSE, or empty strings, the field is not
returned. Instead it now returns the field regardless of the value.
Client
New features:
- REST client host, port, user name, and password can be read from a JSON file.
- Instead of using command-line options on the REST client, the name of
the host, its port, the user's login name, and their password, all can be
stored in a JSON file named using the "--auth" option or stored in an
automatically searched ".foldershareAuth" file in the current folder or in
the user's home folder. The file can contain multiple host and user names,
selected by the "--host" option on the REST client.
- REST client now supports a "json" output format.
- The "--format json" command-line option selects command output in JSON,
which can be easily parsed by most scripting languages.
- REST client "upload" and "download" support "--delete" to delete extra content.
- When synchronizing local and remote folders, if the destnation side has
extra files or folders not present in the source, the "--delete" option
directs that they be deleted. This keeps source and destination identical.
- REST client "upload" and "download" support "--dry-run" to show what would be affected, but not do it.
- When synchronizing local and remote folders, the "--dry-run" option shows
a list of all files that would be uploaded or downloaded, what folders would
be created, and what files or folders would be deleted, but no action is
taken.
- REST client "upload" command performance improved.
- The upload command now issues far fewer server requests during an
upload, improving performance.
Bugs fixed:
- REST client requires a host name even just to show command help.
- Fixed. When no host name is given, options to get help for a command
complain that there is no host. Instead the client will now show any
help information without requiring a host.
- REST client password prompt shows the password.
- Fixed. When no password is given on the command line and the REST client
prompts for it, the password's typed letters are visible. Instead it now
disables typed letters for Linux, BSD, macOS, and other POSIX OSes. The
letters are still visible in Windows due to limitations in the OS.
- REST client help claims it will prompt for the user name, but it doesn't.
- Fixed. The help information says that if a "--username" option is not
given, then the command will prompt for a user name. Instead it correctly
tries to connect anonymously. The help information has been corrected.
- REST client commands that output booleans in "text" format, output an empty string instead.
- Fixed. Output formatting did not properly map boolean true/false values
to "true" and "false" output strings. It does now.
- REST client "hostname" command doesn't support "keyvalue" or "full" formats.
- Fixed. The command's output did not support "keyvalue" or "full" formats,
or the new "json" format. Now it does.
- REST client "ls" command doesn't recurse with "-R" unless "linux" format is used.
- Fixed. The "-R" option requests a recursive folder listing that only
worked with the default "linux" output. It now works with "keyvalue",
"full", and the new "json" output formats.
- REST client "ls" command outputs "full" format when "keyvalue" requested.
- Fixed. When the "keyvalue" output format was selected, the command output
a PHP object "full" format dump instead. It now outputs key-value pairs.
- REST client "ls" command with multiple operands doesn't distinguish between each operand's listing.
- Fixed. When an "ls" command is given two or more operands (e.g. "ls /a /b")
the output for each operand's listing was concatenated without indicating
which output went with which operand. The output is now structured
depending upon the output format and each listing is prefixed with the
operand being listed.
- REST client "ls" command's "keyvalue" format outputs as a PHP dump, not as keyword:value.
- Fixed. The "ls" command incorrectly treated the "keyvalue" format in
the same way as the "full" format, which outputs a PHP object dump.
Instead it is now treated the same as the "text" format, which outputs
a list of keyword:value lines for the files and folders being listed.
- REST client "stat" command with multiple operands doesn't distinguish between each operand's listing.
- Fixed. When an "stat" command is given two or more operands (e.g. "stat /a /b")
the output for each operand's listing was concatenated without indicating
which output went with which operand. The output is now structured
depending upon the output format and each listing is prefixed with the
operand being listed.
- REST client "update" command generates server error on bad field name.
- Fixed. When trying to set the value for a field for a file or folder,
a typo in the field name creates an invalid name that causes a PHP error
on the server. Instead, field names are now validated in the REST client.
- REST client "update" command cannot take multiple arguments, despite help.
- Fixed. The help information for the "update" command says multiple files
and folders may be updated at the same time, but trying to do so gets an
error message. The command now works as advertised.
- Many REST client commands do not support different output formats.
- Fixed. Commands that do not normally output anything were ignoring the
output format choice and falling back on a "full" format if they did
output. The commands now output different formats properly. Commands
affected include "chown", "cp", "mkdir", "mv", "rm", "rmdir", "update",
"version", and "whoami".
- REST client "upload" and "download" commands accept "-n" and "--sync" options together, but shouldn't.
- Fixed. The "-n" option requests transfers that do not overwrite existing
files, and instead rename transferred files with a unique sequence number
suffix. The "--sync" option requests that transfers only occur if files
are newer. But "--sync" cannot work if it cannot see a file with the same
name, which makes the combination of "-n" and "--sync" unworkable. The two
options now cannot be used together.
- REST client "xattr" command does not output anyting except when using the "full" format.
- Fixed. When using the "keyvalue" or "linux" formats, the command outputs
nothing. Instead it now supports these formats.
- REST client "xattr" command doesn't sort output by keyword.
- Fixed. The command outputs a list of keyword-value pairs for file or
folder attributes, but the list was in an undefined order. It is now
sorted.
- REST client "xattr" claims to show the "systemhidden" attribute, but can't.
- Fixed. The "systemhidden" attribute is an internal file and folder
attribute used to mark items that are in the process of being deleted.
Such items therefore do not really exist any more and any attempt to
get their attributes correctly returns a "Not found" error. Since items
with this attribute set are never found, the "systemhidden" attribute can
only be shown for non-hidden items where it is always "false". This makes
it pointless to show so the feature has been removed.
- REST client "upload" command doesn't handle symbolic links properly.
- Fixed. When uploading a folder that contains a symbolic link to another
file or folder, the name and path to the link's target, rather of the link,
was used to create and name remote folders. Instead it now uses the name
and path to the link.