@sisense/sdk-modeling 0.16.0 → 1.1.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/dist/typescript/writer.js +3 -8
- package/package.json +13 -2
|
@@ -17,7 +17,7 @@ import path from 'path';
|
|
|
17
17
|
import { DimensionalDataModel, MetadataTypes, } from '@sisense/sdk-data';
|
|
18
18
|
import { BaseMeasureWriter, MeasureTemplateWriter } from './writers/measures.js';
|
|
19
19
|
import { DimensionWriter, DateDimensionWriter } from './writers/dimensions.js';
|
|
20
|
-
import { NEWLINE
|
|
20
|
+
import { NEWLINE } from './writers/base.js';
|
|
21
21
|
import { createInMemoryDuplexStream } from './utils/create-in-memory-duplex-stream.js';
|
|
22
22
|
import { compileTsCode } from './utils/compile-ts-code.js';
|
|
23
23
|
function getWriter(item) {
|
|
@@ -47,13 +47,8 @@ function fillStreamWithTsCode(stream, json, config) {
|
|
|
47
47
|
}
|
|
48
48
|
// writing imports
|
|
49
49
|
const datamodule = config.datamodule || '@sisense/sdk-data';
|
|
50
|
-
stream.write(`import {
|
|
51
|
-
${NEWLINE}${
|
|
52
|
-
${NEWLINE}${indent(1)}DateDimension,\
|
|
53
|
-
${NEWLINE}${indent(1)}Attribute,\
|
|
54
|
-
${NEWLINE}${indent(1)}createAttribute,\
|
|
55
|
-
${NEWLINE}${indent(1)}createDateDimension,\
|
|
56
|
-
${NEWLINE}${indent(1)}createDimension,${NEWLINE}} from '${datamodule}';${NEWLINE}${NEWLINE}`);
|
|
50
|
+
stream.write(`import type { Dimension, DateDimension, Attribute } from '${datamodule}';${NEWLINE}
|
|
51
|
+
import { createAttribute, createDateDimension, createDimension } from '${datamodule}';${NEWLINE}${NEWLINE}`);
|
|
57
52
|
stream.write(`export const DataSource = '${dm.dataSource}';${NEWLINE}`);
|
|
58
53
|
for (let i = 0; i < writers.length; i++) {
|
|
59
54
|
stream.write(NEWLINE);
|
package/package.json
CHANGED
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sisense/sdk-modeling",
|
|
3
|
-
"
|
|
3
|
+
"homepage": "https://sisense.dev/guides/sdk/",
|
|
4
|
+
"description": "Compose SDK package for generating programmatic interface from Sisense data model",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/sisense/compose-sdk-monorepo",
|
|
8
|
+
"directory": "packages/sdk-modeling"
|
|
9
|
+
},
|
|
10
|
+
"keywords": [
|
|
11
|
+
"Sisense",
|
|
12
|
+
"Compose SDK"
|
|
13
|
+
],
|
|
14
|
+
"version": "1.1.0",
|
|
4
15
|
"author": "Sisense",
|
|
5
16
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
17
|
"type": "module",
|
|
@@ -9,7 +20,7 @@
|
|
|
9
20
|
"module": "./dist/index.js",
|
|
10
21
|
"types": "./dist/index.d.ts",
|
|
11
22
|
"dependencies": {
|
|
12
|
-
"@sisense/sdk-data": "^
|
|
23
|
+
"@sisense/sdk-data": "^1.1.0",
|
|
13
24
|
"typescript": "4.8.4"
|
|
14
25
|
},
|
|
15
26
|
"scripts": {
|