@sisense/sdk-cli 1.3.0 → 1.4.1

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/README.md CHANGED
@@ -2,39 +2,15 @@ This library, which is a part of Sisense Compose SDK,
2
2
  provides a set of command line utilities.
3
3
  One of which is to generate TypeScript representation of a Sisense data model.
4
4
 
5
- ## Installation
6
-
7
- Install the package as a dev dependency in your project.
8
-
9
- With npm:
10
-
11
- ```sh
12
- npm i @sisense/sdk-cli --save-dev
13
- ```
14
-
15
- With Yarn:
16
-
17
- ```sh
18
- yarn add @sisense/sdk-cli --dev
19
- ```
20
-
21
5
  ## Usage
22
6
 
23
7
  Run the following command to create a `my-data-source.ts` file that contains a TypeScript representation of your data model.
24
8
  Substitute `<username>`, `<instance url>`, `<data source name>` with the values for your instance.
25
9
 
26
- With npm:
27
-
28
10
  ```sh
29
11
  npx sdk-cli get-data-model --username "<username>" --output my-data-source.ts --dataSource "<data source name>" --url <instance url>
30
12
  ```
31
13
 
32
- With Yarn:
33
-
34
- ```sh
35
- yarn run sdk-cli get-data-model --username "<username>" --output my-data-source.ts --dataSource "<data source name>" --url <instance url>
36
- ```
37
-
38
14
  You will be prompted for the password.
39
15
 
40
16
  The resulting file is created in the current directory.
@@ -42,29 +18,13 @@ The resulting file is created in the current directory.
42
18
  Instead of `--username "<username>"`, you can also use `--token <token>` to authenticate with [an API token](https://sisense.dev/guides/restApi/using-rest-api.html).
43
19
  Substitute `<token>`, `<instance url>`, `<data source name>` with the values for your instance.
44
20
 
45
- With npm:
46
-
47
21
  ```sh
48
22
  npx sdk-cli get-data-model --token <token> --output my-data-source.ts --dataSource "<data source name>" --url <instance url>
49
23
  ```
50
24
 
51
- With Yarn:
52
-
53
- ```sh
54
- yarn run sdk-cli get-data-model --token <token> --output my-data-source.ts --dataSource "<data source name>" --url <instance url>
55
- ```
56
-
57
25
  Or use `--wat <wat>` to authenticate with a [Web Access Token (WAT)](https://docs.sisense.com/main/SisenseLinux/using-web-access-token.htm).
58
26
  Substitute `<token>`, `<instance url>`, `<data source name>` with the values for your instance.
59
27
 
60
- With npm:
61
-
62
28
  ```sh
63
29
  npx sdk-cli get-data-model --wat <wat> --output my-data-source.ts --dataSource "<data source name>" --url <instance url>
64
30
  ```
65
-
66
- With Yarn:
67
-
68
- ```sh
69
- yarn run sdk-cli get-data-model --wat <wat> --output my-data-source.ts --dataSource "<data source name>" --url <instance url>
70
- ```
package/dist/index.d.ts CHANGED
@@ -3,4 +3,5 @@
3
3
  * @packageDocumentation
4
4
  */
5
5
  import 'cross-fetch/dist/node-polyfill.js';
6
+ import 'node-window-polyfill/register.js';
6
7
  export * from './types.js';
package/dist/index.js CHANGED
@@ -7,6 +7,9 @@
7
7
  // Somehow import 'cross-fetch/polyfill' does not work thus the following workaround
8
8
  // eslint-disable-next-line import/extensions
9
9
  import 'cross-fetch/dist/node-polyfill.js';
10
+ // Direct and indirect dependencies of sdk-cli may use the window object.
11
+ // Polyfill the window object with node-window-polyfill to avoid error "window is not defined"
12
+ import 'node-window-polyfill/register.js';
10
13
  import { runCli } from './run-cli.js';
11
14
  export * from './types.js';
12
15
  runCli();
@@ -1 +1 @@
1
- export declare const PKG_VERSION = "1.3.0";
1
+ export declare const PKG_VERSION = "1.4.1";
@@ -1 +1 @@
1
- export const PKG_VERSION = "1.3.0";
1
+ export const PKG_VERSION = "1.4.1";
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "Sisense",
12
12
  "Compose SDK"
13
13
  ],
14
- "version": "1.3.0",
14
+ "version": "1.4.1",
15
15
  "type": "module",
16
16
  "exports": "./dist/index.js",
17
17
  "main": "./dist/index.js",
@@ -20,14 +20,15 @@
20
20
  "license": "SEE LICENSE IN LICENSE.md",
21
21
  "bin": "./dist/index.js",
22
22
  "dependencies": {
23
- "@sisense/sdk-common": "^1.3.0",
24
- "@sisense/sdk-data": "^1.3.0",
25
- "@sisense/sdk-modeling": "^1.3.0",
26
- "@sisense/sdk-query-client": "^1.3.0",
27
- "@sisense/sdk-rest-client": "^1.3.0",
28
- "@sisense/sdk-tracking": "^1.3.0",
23
+ "@sisense/sdk-common": "^1.4.1",
24
+ "@sisense/sdk-data": "^1.4.1",
25
+ "@sisense/sdk-modeling": "^1.4.1",
26
+ "@sisense/sdk-query-client": "^1.4.1",
27
+ "@sisense/sdk-rest-client": "^1.4.1",
28
+ "@sisense/sdk-tracking": "^1.4.1",
29
29
  "cross-fetch": "^4.0.0",
30
30
  "inquirer": "^8.1.2",
31
+ "node-window-polyfill": "^1.0.2",
31
32
  "yargs": "17.7.1"
32
33
  },
33
34
  "scripts": {
@@ -55,9 +56,9 @@
55
56
  "@types/inquirer": "8.2.6",
56
57
  "@types/yargs": "^17.0.22",
57
58
  "eslint": "^8.40.0",
59
+ "msw": "2.2.1",
58
60
  "prettier": "2.8.4",
59
- "typescript": "4.8.4",
60
- "vitest-fetch-mock": "^0.2.2"
61
+ "typescript": "4.8.4"
61
62
  },
62
63
  "volta": {
63
64
  "extends": "../../package.json"