@sap/datasphere-cli 2025.2.0 → 2025.3.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.
Files changed (3) hide show
  1. package/CHANGELOG.md +1 -1
  2. package/README.md +13 -12
  3. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -15,7 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
15
15
 
16
16
  ### Added
17
17
 
18
- - New command `<cli> config secrets check` has been added to the CLI. This command allows you to verify whether the secrets file used to run commands is consistent.
18
+ - New command `datasphere config secrets check` has been added to the CLI. This command allows you to verify whether the secrets file used to run commands is consistent.
19
19
 
20
20
  Examples for inconsistent secrets files:
21
21
 
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Command-Line Interface (CLI) for SAP Datasphere.
4
4
 
5
- [![Node Version](https://img.shields.io/badge/node-18.xx.x-brightgreen)](https://nodejs.org/dist/latest-v18.x/docs/api/#) [![Node Version](https://img.shields.io/badge/node-19.xx.x-brightgreen)](https://nodejs.org/dist/latest-v19.x/docs/api/#) [![Node Version](https://img.shields.io/badge/node-20.xx.x-brightgreen)](https://nodejs.org/dist/latest-v20.x/docs/api/#) [![Node Version](https://img.shields.io/badge/node-21.xx.x-brightgreen)](https://nodejs.org/dist/latest-v21.x/docs/api/#) [![npm version](https://badge.fury.io/js/@sap%2Fdatasphere-cli.svg)](https://badge.fury.io/js/@sap%2Fdatasphere-cli) [![Documentation](https://img.shields.io/badge/docs-online-ff69b4.svg)](https://help.sap.com/docs/SAP_DATASPHERE/d0ecd6f297ac40249072a44df0549c1a/3f9a42ccde6b4b6aba121e2aab79c36d.html) [![Command help pages](https://img.shields.io/badge/command-help-lightgrey.svg)](#usage) ![NPM](https://img.shields.io/npm/l/@sap/datasphere-cli?color=%23FFFF00)
5
+ [![Node Version](https://img.shields.io/badge/node-18.xx.x-brightgreen)](https://nodejs.org/dist/latest-v18.x/docs/api/#) [![Node Version](https://img.shields.io/badge/node-19.xx.x-brightgreen)](https://nodejs.org/dist/latest-v19.x/docs/api/#) [![Node Version](https://img.shields.io/badge/node-20.xx.x-brightgreen)](https://nodejs.org/dist/latest-v20.x/docs/api/#) [![Node Version](https://img.shields.io/badge/node-21.xx.x-brightgreen)](https://nodejs.org/dist/latest-v21.x/docs/api/#) [![Node Version](https://img.shields.io/badge/node-22.xx.x-brightgreen)](https://nodejs.org/dist/latest-v22.x/docs/api/#) [![npm version](https://badge.fury.io/js/@sap%2Fdatasphere-cli.svg)](https://badge.fury.io/js/@sap%2Fdatasphere-cli) [![Documentation](https://img.shields.io/badge/docs-online-ff69b4.svg)](https://help.sap.com/docs/SAP_DATASPHERE/d0ecd6f297ac40249072a44df0549c1a/3f9a42ccde6b4b6aba121e2aab79c36d.html) [![Command help pages](https://img.shields.io/badge/command-help-lightgrey.svg)](#usage) ![NPM](https://img.shields.io/npm/l/@sap/datasphere-cli?color=%23FFFF00)
6
6
 
7
7
  ## Content
8
8
 
@@ -25,13 +25,13 @@ Command-Line Interface (CLI) for SAP Datasphere.
25
25
  ## Installation
26
26
 
27
27
  ```bash
28
- npm install -g @sap/datasphere-cli
28
+ npm install [-g] @sap/datasphere-cli[@latest]
29
29
  ```
30
30
 
31
31
  or
32
32
 
33
33
  ```bash
34
- yarn global add @sap/datasphere-cli
34
+ yarn [global] add @sap/datasphere-cli[@latest]
35
35
  ```
36
36
 
37
37
  ## Available Commands
@@ -46,7 +46,7 @@ In case of structural changes applied to the service document (see [Initialize t
46
46
 
47
47
  ```bash
48
48
  $ datasphere <command>
49
- Your local CLI installation is outdated. Run 'npm install @sap/datasphere-cli [-g]' to update
49
+ Your local CLI installation is outdated. Run 'npm install @sap/datasphere-cli@latest [-g]' to update
50
50
  ```
51
51
 
52
52
  ## Versioning
@@ -58,7 +58,7 @@ $ datasphere -v
58
58
  2021.21.0
59
59
  ```
60
60
 
61
- For an in-depth explanation see 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/).
61
+ For an in-depth explanation see the blog post on [blogs.sap.com](https://community.sap.com/t5/technology-blogs-by-sap/new-command-line-interface-for-sap-datasphere-code-your-way-to-the-cloud/ba-p/13513481).
62
62
 
63
63
  ## Authentication
64
64
 
@@ -69,7 +69,7 @@ You can create an [OAuth Client for Interactive Usage](https://help.sap.com/docs
69
69
  To log in, run the `login` command and provide the _Client ID_, _Client Secret_, _Authentication URL_, and _Token URL_, available from your SAP Datasphere tenant ([SAP Help](https://help.sap.com/docs/SAP_DATASPHERE/c8a54ee704e94e15926551293243fd1d/3f92b46fe0314e8ba60720e409c219fc.html)).
70
70
 
71
71
  ```bash
72
- $ datasphere login
72
+ $ datasphere login [--authorization-flow client_credentials|authorization_code]
73
73
  ✔ Please enter your client ID: … <Client ID>
74
74
  ✔ Please enter your client secret: … ****
75
75
  ✔ Please enter your authorization URL: … <Authorization URL>
@@ -114,19 +114,20 @@ Alternatively, you can provide the _access_token_ through a `secrets.json` file:
114
114
  datasphere config cache init --host <my host> -secrets-file /path/to/secrets.json
115
115
  ```
116
116
 
117
- The `secrets.json` file must at least contain a property called `access_token`:
117
+ The `secrets.json` file must at least contain the properties `access_token`, or `refresh_token` and `client_id` and `client_secret`, as well as the `tenantUrl`, or `authorization_url` and `token_url`.
118
118
 
119
119
  ```json
120
120
  // secrets.json
121
121
 
122
122
  {
123
+ "tenantUrl": "https://mytenant.eu10.hcs.cloud.sap",
123
124
  "access_token": "<access token>"
124
125
  }
125
126
  ```
126
127
 
127
128
  ### Passcodes
128
129
 
129
- 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.
130
+ It is recommended to use the [OAuth Interactive Usage](#oauth-interactive-usage) login instead of Passcodes. 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.
130
131
 
131
132
  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.
132
133
 
@@ -154,7 +155,7 @@ You can either use the CLI from the terminal or command line, or use the module
154
155
 
155
156
  #### Initialize the CLI
156
157
 
157
- 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
158
+ You can omit this step when using the [OAuth Interactive Usage](#oauth-interactive-usage) login. This step is only required when working with [Passcodes](#passcodes). 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
158
159
 
159
160
  ```bash
160
161
  datasphere config cache init -H https://mytenant.eu10.hcs.cloud.sap/ -p somepasscode
@@ -409,7 +410,7 @@ console.log(result);
409
410
 
410
411
  #### Provide custom passcode retrieval function
411
412
 
412
- You can also provide a custom passcode retrieval function which is called every time before a command is executed. The function is expected to return a promise resolving into a string, the passcode. This way you can, for example, make use of programmatic passcode retrieval as described in [this blog](https://blogs.sap.com/2021/09/27/automatically-add-members-to-spaces-in-sap-data-warehouse-cloud-using-sap-datasphere-cli/) using a headless browser and can omit the `--passcode` option when executing commands. The function needs to be configured only once before executing the first command.
413
+ You can also provide a custom passcode retrieval function which is called every time before a command is executed. The function is expected to return a promise resolving into a string, the passcode. This way you can, for example, make use of programmatic passcode retrieval as described in [this blog](https://community.sap.com/t5/technology-blogs-by-sap/automatically-add-members-to-spaces-in-sap-datasphere-using-sap-datasphere/ba-p/13512444) using a headless browser and can omit the `--passcode` option when executing commands. The function needs to be configured only once before executing the first command.
413
414
 
414
415
  ```javascript
415
416
  const logger = {
@@ -561,7 +562,7 @@ Sets the log level when running commands.
561
562
 
562
563
  ## Help Documentation
563
564
 
564
- 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`:
565
+ 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://community.sap.com/t5/technology-blogs-by-sap/sap-datasphere-cli-command-line-interface-for-sap-datasphere-overview/ba-p/13531596) or use option `-h, --help`:
565
566
 
566
567
  ```bash
567
568
  datasphere <command> -h
@@ -573,7 +574,7 @@ Issues experienced with the CLI can be reported in the [SAP Support Launchpad](h
573
574
 
574
575
  SAP Community provides a forum where you can ask and answer questions, and comment and vote on the questions of others and their answers.
575
576
 
576
- See [SAP Datasphere community](https://community.sap.com/topics/data-warehouse-cloud) for more details and use the tag _datasphere-cli_ for questions concerning the CLI.
577
+ See [SAP Datasphere community](https://pages.community.sap.com/topics/datasphere) for more details and use the tag _datasphere-cli_ for questions concerning the CLI.
577
578
 
578
579
  ## License
579
580
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sap/datasphere-cli",
3
- "version": "2025.2.0",
3
+ "version": "2025.3.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": "2025.1.0"
22
+ "@sap/cli-core": "2025.2.0"
23
23
  }
24
24
  }