Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/npm_and_yarn/rollup-4.24.0
Browse files Browse the repository at this point in the history
  • Loading branch information
chgeo authored Oct 2, 2024
2 parents 62d10e5 + 345fb19 commit eedca81
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion node.js/cds-ql.md
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,7 @@ let [ ID, quantity ] = [ 201, 1 ]
UPDATE (Books,ID) .with ({
title: 'Sturmhöhe', //> simple value
stock: {'-=': quantity}, //> qbe expression
descr: {xpr: [{ref:[descr]}, '||', 'Some addition to descr.'])
descr: {xpr: [{ref:[descr]}, '||', 'Some addition to descr.']}
})
```

Expand Down
14 changes: 14 additions & 0 deletions node.js/cds-utils.md
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,21 @@ await rm('dist/db/data')
The implementation essentially uses `fs.promises.rm()`, with relative fileames resolved in relation to [`cds.root`](cds-facade#cds-root).


### colors {.property}

Provides utilities for coloring terminal output. Colors are automatically enabled if the terminal supports it, but can be overridden via environment variables `NO_COLOR` or `FORCE_COLOR`.

```js
const { BRIGHT, RED, RESET, bg } = cds.utils.colors
console.log(BRIGHT, RED, 'this is bright red text', RESET)
console.log(bg.BLUE, 'this is text with a blue background', RESET)
```

| **Category** | **Values** |
|----------------------|-------------------------------------------------------------------------------------------|
| **Formatting** | `RESET`, `BOLD`, `BRIGHT`, `DIMMED`, `ITALIC`, `UNDER`, `BLINK`, `FLASH`, `INVERT` |
| **Text Colors** | `BLACK`, `RED`, `GREEN`, `YELLOW`, `BLUE`, `PINK`, `CYAN`, `LIGHT_GRAY`, `DEFAULT`, `GRAY`, `LIGHT_RED`, `LIGHT_GREEN`, `LIGHT_YELLOW`, `LIGHT_BLUE`, `LIGHT_PINK`, `LIGHT_CYAN`, `WHITE` |
| **Background Colors** | `BLACK`, `RED`, `GREEN`, `YELLOW`, `BLUE`, `PINK`, `CYAN`, `WHITE`, `DEFAULT`, `LIGHT_GRAY`, `LIGHT_RED`, `LIGHT_GREEN`, `LIGHT_YELLOW`, `LIGHT_BLUE`, `LIGHT_PINK`, `LIGHT_CYAN`, `LIGHT_WHITE` |


## Shortcuts to Node.js Modules
Expand Down

0 comments on commit eedca81

Please sign in to comment.