github polterguy/magic v8.4.1
Use cases, and other minor changes and fixes

latest releases: v17.3.9, v17.3.8, v17.3.7...
3 years ago

Version 8.4.1

Magic (main)

Fixed a TypeScript null reference error that would occur if you showed "System endpoints" in the files menu,
and applied filtering to look for a specific endpoint.

Support for displaying image results in the "Endpoints" menu item, but only for GET invocations. If the
endpoint returns Content-Type of "image/xxx", the results of the invocation will be displayed using an img
tag, and not attempted to be loaded (erronously) into the JSON CodeMirror instance.

In the "Endpoints" file menu, we now also display the "Content-Type" the endpoint returns. In addition,
you can now do basic sorting of endpoints, in addition to the already existing filtering logic. Also,
"magic" endpoints (scaffolded database named magic) will no longer show, unless you explicitly choose
to display system endpoints. Also slightly improved rendering of QUERY argument list, to make them more
explicitly appear like buttons, with hovering and active effects.

Created better alignment of "view details" sheet in scaffolded components, by making sure its colspan
by default is the same size as the number of records returned from "read" endpoint. This makes the colspan
too large, since it'll also include primary keys - Which doesn't doo anything, since browser ignores columns
that are larger than the total number of columns in table. But, it also makes it simpler to add more columns
to the material table, since user's don't have to fiddle with the colspan property, unless they add more columns
in the backing database table, and backend HTTP REST endpoint.

Created better example SQL scripts, creating some default databases, solving arguably more "real world"
problems, such as translations, registrations, etc.

magic.lambda.validators

Making sure we show the last iterator's value, which would normally be the argument name, if we throw exceptions.
This would normally result in giving more detailed feedback to the client providing the invalid input.

Also supporting having one validator validating multiple arguments, by invoking Evaluate on expression, if
value of validation node is an expression, and invoking validation logic once for all values resulting from
iterating expression's results. This allows one single validator to validate multiple arguments.

magic.endpoint

The meta data retrieval now returns the Content-Type the endpoint returns, if it can deduct it. Notice, this
is not always possible, since the Content-Type might be the results of branching, and different according to
which branch the code takes. But if there's only one declaration of Content-Type headers in the endpoint,
the list-endpoints slots will return this during meta data retrieval. And if there is no explicit Content-Type
declaration, we know the default will be returned, which is "application/json".

magic.lambda.strings

Added new slot called [strings.url-encode] that allows you to URL encode a string, for passing
it in as a QUERY parameter to for instance an HTTP GET endpoint, etc.

Don't miss a new magic release

NewReleases is sending notifications on new releases.