@sap/datasphere-cli 2024.9.0 → 2024.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +45 -1
- package/README.md +71 -13
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -5,7 +5,51 @@ All notable changes to this project SAP Datasphere Command-Line Interface (DS CL
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
-
## 2024.
|
|
8
|
+
## 2024.12.0
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- No short flag could be calculated for an option even though for the command owning the option not all short flags were used.
|
|
13
|
+
|
|
14
|
+
## 2024.11.0
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
|
|
18
|
+
- Added a new command `datasphere config secrets refresh` which can be used to refresh the access token of the host defined via option `--host` or set as the global host via `datasphere config host set <host>`.
|
|
19
|
+
|
|
20
|
+
- Added option `--purge-all` to command `datasphere config cache clean` to enable clients to remove the whole cache if required.
|
|
21
|
+
|
|
22
|
+
### Fixed
|
|
23
|
+
|
|
24
|
+
- In case the login failed, the CLI would still store the inconsistent secret information to the CLI cache. This caused issues as following login attempts failed without a good reason. With this version, whenever a login fails, the CLI does not store inconsistent secrets to enable the user to run additional login attempts successfully. Also, the CLI prints a verbose message when the `--verbose` option is added in case an expired access token cannot be refreshed.
|
|
25
|
+
|
|
26
|
+
- The CLI used the same short flag for different options. For example, the short flag `-f` was used twice for the two different options `--force-definition-deployment` and `--file-path`:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
Options:
|
|
30
|
+
-f, --force-definition-deployment force redeployment of definitions (optional)
|
|
31
|
+
-n, --no-async do not run deployment asynchronously (optional)
|
|
32
|
+
-e, --enforce-database-user-deletion to allow deletion of Database users (optional)
|
|
33
|
+
-f, --file-path <path> specifies the file to use as input for the command (optional)
|
|
34
|
+
-i, --input <input> specifies input as string to use for the command (optional)
|
|
35
|
+
-h, --help display help for command
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
With this version the CLI ensures that a short flag is only used once.
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
Options:
|
|
42
|
+
-f, --force-definition-deployment force redeployment of definitions (optional)
|
|
43
|
+
-n, --no-async do not run deployment asynchronously (optional)
|
|
44
|
+
-e, --enforce-database-user-deletion to allow deletion of Database users (optional)
|
|
45
|
+
-F, --file-path <path> specifies the file to use as input for the command (optional)
|
|
46
|
+
-i, --input <input> specifies input as string to use for the command (optional)
|
|
47
|
+
-h, --help display help for command
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
- When using an access token from another tenant, where the user the access token belongs to is not existing in the target tenant, the CLI now prints a warning saying that the used access token is invalid. The login credentials have to be refreshed in this case and a valid access token must be used.
|
|
51
|
+
|
|
52
|
+
## 2024.9.0
|
|
9
53
|
|
|
10
54
|
### Fixed
|
|
11
55
|
|
package/README.md
CHANGED
|
@@ -24,13 +24,13 @@ Command-Line Interface (CLI) for SAP Datasphere.
|
|
|
24
24
|
## Installation
|
|
25
25
|
|
|
26
26
|
```bash
|
|
27
|
-
|
|
27
|
+
npm install -g @sap/datasphere-cli
|
|
28
28
|
```
|
|
29
29
|
|
|
30
30
|
or
|
|
31
31
|
|
|
32
32
|
```bash
|
|
33
|
-
|
|
33
|
+
yarn global add @sap/datasphere-cli
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
## Update the CLI
|
|
@@ -74,7 +74,7 @@ $ datasphere login
|
|
|
74
74
|
To remove any data stored by running the `login` command, log out again:
|
|
75
75
|
|
|
76
76
|
```bash
|
|
77
|
-
|
|
77
|
+
datasphere logout
|
|
78
78
|
```
|
|
79
79
|
|
|
80
80
|
To display the locally stored secrets, run the `secrets show` command:
|
|
@@ -100,13 +100,13 @@ $ datasphere secrets show
|
|
|
100
100
|
If you do not want to log in and have the CLI store the secrets in the CLI cache locally, you can also provide the _access_token_ directly on the command line:
|
|
101
101
|
|
|
102
102
|
```bash
|
|
103
|
-
|
|
103
|
+
datasphere config cache init --host <my host> --access-token <access token>
|
|
104
104
|
```
|
|
105
105
|
|
|
106
106
|
Alternatively, you can provide the _access_token_ through a `secrets.json` file:
|
|
107
107
|
|
|
108
108
|
```bash
|
|
109
|
-
|
|
109
|
+
datasphere config cache init --host <my host> -secrets-file /path/to/secrets.json
|
|
110
110
|
```
|
|
111
111
|
|
|
112
112
|
The `secrets.json` file must at least contain a property called `access_token`:
|
|
@@ -121,7 +121,7 @@ The `secrets.json` file must at least contain a property called `access_token`:
|
|
|
121
121
|
|
|
122
122
|
### Passcodes
|
|
123
123
|
|
|
124
|
-
Passcodes are used for authenticating commands sent from the CLI to your SAP Datasphere tenant. Passcodes can be provided explicitly using the `-p, --passcode` option in case the URL to retrieve a passcode is known, or
|
|
124
|
+
Passcodes are used for authenticating commands sent from the CLI to your SAP Datasphere tenant. Passcodes can be provided explicitly using the `-p, --passcode` option in case the URL to retrieve a passcode is known, or implicitly using an interactive session by omitting the `-p, --passcode` option.
|
|
125
125
|
|
|
126
126
|
When omitting the `-p, --passcode` option the CLI prompts you to provide a passcode by navigating to the passcode authentication URL for your tenant. The URL is calculated based on the provided `-H, --host` value.
|
|
127
127
|
|
|
@@ -152,7 +152,7 @@ You can either use the CLI from the terminal or command line, or use the module
|
|
|
152
152
|
Before you can list and run commands against your SAP Datasphere tenant you need to initialize the CLI first. When initializing the CLI a service document is downloaded from your SAP Datasphere tenant which describes the commands your tenant is able to understand. To initialize the CLI run
|
|
153
153
|
|
|
154
154
|
```bash
|
|
155
|
-
|
|
155
|
+
datasphere config cache init -H https://mytenant.eu10.hcs.cloud.sap/ -p somepasscode
|
|
156
156
|
```
|
|
157
157
|
|
|
158
158
|
You can refresh the local copy of the service document by running the `config cache init` command again.
|
|
@@ -176,7 +176,7 @@ Command-Line Interface for SAP Datasphere.
|
|
|
176
176
|
|
|
177
177
|
Options:
|
|
178
178
|
-v, --version output the current version
|
|
179
|
-
-H, --host <host> specifies the
|
|
179
|
+
-H, --host <host> specifies the url host where the tenant is hosted where the tenant is hosted
|
|
180
180
|
-h, --help display help for command
|
|
181
181
|
|
|
182
182
|
Commands:
|
|
@@ -456,7 +456,7 @@ Options:
|
|
|
456
456
|
You can use the short flag or long name to supply an option value on the command-line:
|
|
457
457
|
|
|
458
458
|
```bash
|
|
459
|
-
|
|
459
|
+
datasphere config cache init --host <host>
|
|
460
460
|
```
|
|
461
461
|
|
|
462
462
|
#### Using environment variables
|
|
@@ -464,7 +464,7 @@ $ datasphere config cache init --host <host>
|
|
|
464
464
|
To provide an option value, the option's long name is translated to CONSTANT_CASE. For example, the option `client-id` can also be provided as follows:
|
|
465
465
|
|
|
466
466
|
```bash
|
|
467
|
-
|
|
467
|
+
CLIENT_ID='<my client id>' HOST='my-host' datasphere config cache init
|
|
468
468
|
```
|
|
469
469
|
|
|
470
470
|
#### Provide options file
|
|
@@ -483,12 +483,60 @@ You can provide a JSON file with a map of options, using the option's long names
|
|
|
483
483
|
Then, supply it to the CLI:
|
|
484
484
|
|
|
485
485
|
```bash
|
|
486
|
-
|
|
486
|
+
datasphere config cache init --options-file /path/to/options-file.json
|
|
487
487
|
```
|
|
488
488
|
|
|
489
489
|
### Environment Variables
|
|
490
490
|
|
|
491
|
-
The CLI supports the following environment variables. You can set the environment variables when calling the CLI according to
|
|
491
|
+
The CLI supports the following environment variables. You can set the environment variables when calling the CLI according to your local environment.
|
|
492
|
+
|
|
493
|
+
#### Mac
|
|
494
|
+
|
|
495
|
+
See [support.apple.com](https://support.apple.com/de-de/guide/terminal/apd382cc5fa-4f58-4449-b20a-41c53c006f8f/mac).
|
|
496
|
+
|
|
497
|
+
```bash
|
|
498
|
+
<env>=<value> datasphere <command>
|
|
499
|
+
```
|
|
500
|
+
|
|
501
|
+
Example:
|
|
502
|
+
|
|
503
|
+
```bash
|
|
504
|
+
LOG_LEVEL=6 datasphere login
|
|
505
|
+
```
|
|
506
|
+
|
|
507
|
+
#### Windows (Powershell)
|
|
508
|
+
|
|
509
|
+
See [learn.microsoft.com](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_environment_variables?view=powershell-7.4).
|
|
510
|
+
|
|
511
|
+
```bash
|
|
512
|
+
$Env:<env>=<value>
|
|
513
|
+
datasphere <command>
|
|
514
|
+
```
|
|
515
|
+
|
|
516
|
+
Example:
|
|
517
|
+
|
|
518
|
+
```bash
|
|
519
|
+
$Env:LOG_LEVEL=6
|
|
520
|
+
datasphere login
|
|
521
|
+
```
|
|
522
|
+
|
|
523
|
+
#### On Windows (CMD)
|
|
524
|
+
|
|
525
|
+
See [learn.microsoft.com](https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/set_1).
|
|
526
|
+
|
|
527
|
+
```bash
|
|
528
|
+
set <env>=<value>
|
|
529
|
+
datasphere <command>
|
|
530
|
+
```
|
|
531
|
+
|
|
532
|
+
Example:
|
|
533
|
+
|
|
534
|
+
```bash
|
|
535
|
+
set LOG_LEVEL=6
|
|
536
|
+
datasphere login
|
|
537
|
+
```
|
|
538
|
+
|
|
539
|
+
In addition, the CLI supports the [`dotenv`](https://www.npmjs.com/package/dotenv#usage) module, allowing you to place a `.env` file in the CLI working directory.
|
|
492
540
|
|
|
493
541
|
#### `CLI_HTTP_PORT`
|
|
494
542
|
|
|
@@ -498,14 +546,24 @@ Defines the port the CLI starts the HTTP server at when logging in when using OA
|
|
|
498
546
|
| ------ | -------- | ------- |
|
|
499
547
|
| number | no | 8080 |
|
|
500
548
|
|
|
549
|
+
#### `LOG_LEVEL`
|
|
550
|
+
|
|
551
|
+
Sets the log level when running commands.
|
|
552
|
+
|
|
553
|
+
| Type | Required | Default | Allowed Values |
|
|
554
|
+
| ------ | -------- | ------- | -------------------------------------------------------------------- |
|
|
555
|
+
| number | no | 1 | 1 (Inactive), 2 (Error), 3 (Warning), 4 (Info), 5 (Debug), 6 (Trace) |
|
|
556
|
+
|
|
501
557
|
## Help Documentation
|
|
502
558
|
|
|
503
559
|
Find the full documentation on [help.sap.com](https://help.sap.com/docs/SAP_DATASPHERE/d0ecd6f297ac40249072a44df0549c1a/3f9a42ccde6b4b6aba121e2aab79c36d.html), check out the blog post on [blogs.sap.com](https://blogs.sap.com/2021/09/21/new-command-line-for-sap-data-warehouse-cloud-code-way-to-the-cloud/) or use option `-h, --help`:
|
|
504
560
|
|
|
505
561
|
```bash
|
|
506
|
-
|
|
562
|
+
datasphere <command> -h
|
|
507
563
|
```
|
|
508
564
|
|
|
565
|
+
Issues experienced with the CLI can be reported in the [SAP Support Launchpad](https://launchpad.support.sap.com/#incident/create) using component **DS-API-CLI**. When creating an incident, please attach a full trace log by enabling the [`LOG_LEVEL environment variable`](#log_level) before running the command (log level is 6 (trace)).
|
|
566
|
+
|
|
509
567
|
## Community & Feedback
|
|
510
568
|
|
|
511
569
|
SAP Community provides a forum where you can ask and answer questions, and comment and vote on the questions of others and their answers.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap/datasphere-cli",
|
|
3
|
-
"version": "2024.
|
|
3
|
+
"version": "2024.13.0",
|
|
4
4
|
"description": "Command-Line Interface for SAP Datasphere.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"author": "SAP SE",
|
|
@@ -19,6 +19,6 @@
|
|
|
19
19
|
"datasphere-cli"
|
|
20
20
|
],
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@sap/cli-core": "2024.
|
|
22
|
+
"@sap/cli-core": "2024.12.0"
|
|
23
23
|
}
|
|
24
24
|
}
|