Closed gregorwolf closed 4 years ago
I'm observing the very same for the transformation cds --> csn via the cds command. For instance:
cds .\samples.cds > samples.csn
When opening with VS Code Editor (it's guessing this to be UTF-16 LE), this shows up like:
{
namespace: [32m'my.domain'[39m,
definitions: [Object: null prototype] {
[32m'my.domain.Products'[39m: {
kind: [32m'entity'[39m,
elements: [Object: null prototype] {
ID: { key: [33mtrue[39m, type: [32m'cds.Integer'[39m },
name: { type: [32m'cds.String'[39m, length: [33m100[39m, notNull: [33mtrue[39m },
stock: { type: [32m'cds.Integer'[39m },
...
When I'm looking just at the command line output of cds samples.cds
(Powershell), then everything looks fine!
Opening samples.csn with Notepad++ shows the little ?s as ESC
. So searching for common ESCAPE code (https://bluesock.org/~willkg/dev/ansi.html), I've found this to be color code Escape Sequences! Somehow, these are polluting the output ....
Obviously, the command line is interpreting the color codes, the Editors don't.
Is fixed with @sap/cds version 3.31.2
When I upgrade my example project bookshop-nodejs to @sap/cds version 3.31.1:
and then run the command:
cds compile srv/ --to xsuaa > xs-security.json
the generated xs-security.json looks like this:
with 3.21.3 it was generated like this: