Skip to content

Commit d1d3a38

Browse files
authored
EasyData.NET 1.5.9
2 parents 6f34574 + 403af70 commit d1d3a38

40 files changed

+3710
-571
lines changed

easydata.js/bundles/crud/rollup.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import commonjs from '@rollup/plugin-commonjs'
33
import terser from '@rollup/plugin-terser'
44
import progress from 'rollup-plugin-progress'
55
import typescript from '@rollup/plugin-typescript'
6-
import typedoc from '@olton/rollup-plugin-typedoc'
6+
// import typedoc from '@olton/rollup-plugin-typedoc'
77
import multi from '@rollup/plugin-multi-entry'
88
import * as path from "path";
99
import { fileURLToPath } from 'url';

easydata.js/packs/core/rollup.config.mjs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ import commonjs from '@rollup/plugin-commonjs'
33
import terser from '@rollup/plugin-terser'
44
import progress from 'rollup-plugin-progress'
55
import typescript from '@rollup/plugin-typescript'
6-
import typedoc from '@olton/rollup-plugin-typedoc'
6+
// import typedoc from '@olton/rollup-plugin-typedoc'
77
import * as path from "path";
88
import { fileURLToPath } from 'url';
9-
import pkg from './package.json' assert { type: 'json' };
9+
import pkg from './package.json' with { type: 'json' };
1010

1111
const __filename = fileURLToPath(import.meta.url);
1212
const __dirname = path.dirname(__filename);
@@ -37,12 +37,12 @@ export default [
3737
typescript({ sourceMap: sourcemap, }),
3838
nodeResolve({ browser: true, }),
3939
commonjs(),
40-
typedoc({
41-
json: '../../docs/easydata-core.json',
42-
out: './docs',
43-
entryPoints: ['./src/**/*.ts'],
44-
tsconfig: './tsconfig.json',
45-
}),
40+
// typedoc({
41+
// json: '../../docs/easydata-core.json',
42+
// out: './docs',
43+
// entryPoints: ['./src/**/*.ts'],
44+
// tsconfig: './tsconfig.json',
45+
// }),
4646
],
4747
output: [
4848
{

easydata.js/packs/core/tests/aggr_settings.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ describe('AggregationSettings', () => {
2020
return result;
2121
},
2222
validateColumns: (columns) => {
23-
// Simple check - all columns must start with 'col'
23+
// Simple check - all columns should start with 'col'
2424
return columns.every(col => typeof col === 'string' && col.startsWith('col'));
2525
},
2626
validateAggregate: (colId, funcId) => {

easydata.js/packs/core/tests/aggr_structures.test.ts

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
DataGroup
1212
} from '../src/data/aggr_structures';
1313

14-
// Тесты для AggregationColumnStore
14+
// Tests for AggregationColumnStore
1515
describe('AggregationColumnStore Interface', () => {
1616
let columnStore: AggregationColumnStore;
1717

@@ -35,30 +35,30 @@ describe('AggregationColumnStore Interface', () => {
3535
};
3636
});
3737

38-
it('должен возвращать массив идентификаторов колонок в указанном диапазоне', () => {
38+
it('should return an array of column identifiers in specified range', () => {
3939
const columns = columnStore.getColumnIds(1, 3);
4040
expect(columns).toBeArrayEqual(['col1', 'col2', 'col3']);
4141
});
4242

43-
it('должен возвращать один идентификатор колонки, если указан только начальный индекс', () => {
43+
it('should return a single column identifier if only starting index is specified', () => {
4444
const columns = columnStore.getColumnIds(5);
4545
expect(columns).toBeArrayEqual(['col5']);
4646
});
4747

48-
it('должен проверять валидность колонок', () => {
48+
it('should check the column validity', () => {
4949
expect(columnStore.validateColumns(['col1', 'col2'])).toBe(true);
5050
expect(columnStore.validateColumns(['col1', 'invalid'])).toBe(false);
5151
});
5252

53-
it('должен проверять валидность агрегатной функции для колонки', () => {
53+
it('should check the aggregate function validity for column', () => {
5454
expect(columnStore.validateAggregate('col1', 'sum')).toBe(true);
5555
expect(columnStore.validateAggregate('col2', 'avg')).toBe(true);
5656
expect(columnStore.validateAggregate('col3', 'invalid')).toBe(false);
5757
expect(columnStore.validateAggregate('invalid', 'sum')).toBe(false);
5858
});
5959
});
6060

61-
// Тесты для AggregatesContainer
61+
// Tests for AggregatesContainer
6262
describe('AggregatesContainer Interface', () => {
6363
let container: AggregatesContainer;
6464

@@ -89,27 +89,27 @@ describe('AggregatesContainer Interface', () => {
8989
};
9090
});
9191

92-
it('должен сохранять данные агрегации для определенного уровня', () => {
92+
it('should save aggregate data for a specific level', () => {
9393
const data = new Map<string, GroupTotals>();
9494
data.set(JSON.stringify({col1: 'value1'}), {sum: 100, count: 10});
9595

9696
container.setAggregateData(1, data);
97-
98-
// Проверим через getAggregateData
97+
98+
// Check this through getAggregateData
9999
return container.getAggregateData(1, {col1: 'value1'})
100100
.then(totals => {
101101
expect(totals).toBeObject({sum: 100, count: 10});
102102
});
103103
});
104104

105-
it('должен возвращать пустой объект для несуществующего уровня', () => {
105+
it('should return an empty object for a non-existent level', () => {
106106
return container.getAggregateData(999, {col1: 'value1'})
107107
.then(totals => {
108108
expect(totals).toBeObject({});
109109
});
110110
});
111111

112-
it('должен обновлять данные агрегации', () => {
112+
it('should update aggregate data', () => {
113113
container.updateAggregateData(1, {col1: 'value1'}, {sum: 100});
114114
container.updateAggregateData(1, {col1: 'value1'}, {sum: 200});
115115

@@ -119,7 +119,7 @@ describe('AggregatesContainer Interface', () => {
119119
});
120120
});
121121

122-
it('должен создавать новый уровень при обновлении данных несуществующего уровня', () => {
122+
it('should create a new level when updating data for a non-existent level', () => {
123123
container.updateAggregateData(2, {col2: 'value2'}, {avg: 50});
124124

125125
return container.getAggregateData(2, {col2: 'value2'})
@@ -129,14 +129,14 @@ describe('AggregatesContainer Interface', () => {
129129
});
130130
});
131131

132-
// Тесты для AggregatesCalculator
132+
// Tests for AggregatesCalculator
133133
describe('AggregatesCalculator Interface', () => {
134134
let container: AggregatesContainer;
135135
let calculator: AggregatesCalculator;
136136
let needRecalculationValue: boolean;
137137

138138
beforeEach(() => {
139-
// Создаем мок для AggregatesContainer
139+
// Create mock for AggregatesContainer
140140
container = {
141141
setAggregateData: mock(),
142142
getAggregateData: mock().mockImplementation(async () => ({})),
@@ -145,7 +145,7 @@ describe('AggregatesCalculator Interface', () => {
145145

146146
needRecalculationValue = true;
147147

148-
// Создаем мок для AggregatesCalculator
148+
// Create a mock for AggregatesCalculator
149149
calculator = {
150150
getAggrContainer: () => container,
151151

@@ -160,7 +160,7 @@ describe('AggregatesCalculator Interface', () => {
160160
throw error;
161161
}
162162

163-
// Симулируем вычисление и получение результата
163+
// Simulate calculation and obtaining result
164164
const result = { sum: 100, count: 10 };
165165
if (options?.resultObtained) {
166166
options.resultObtained(result, 1);
@@ -177,12 +177,12 @@ describe('AggregatesCalculator Interface', () => {
177177
};
178178
});
179179

180-
it('должен возвращать контейнер агрегатов', () => {
180+
it('should return an aggregate container', () => {
181181
const result = calculator.getAggrContainer();
182182
expect(result).toBe(container);
183183
});
184184

185-
it('должен выполнять вычисление с вызовом callback-функций', async () => {
185+
it('should perform a calculation with callback functions', async () => {
186186
const resultCallback = mock();
187187
const errorCallback = mock();
188188

@@ -196,7 +196,7 @@ describe('AggregatesCalculator Interface', () => {
196196
expect(calculator.needRecalculation()).toBe(false);
197197
});
198198

199-
it('должен вызывать errorOccurred при ошибке вычисления', async () => {
199+
it('should call the errorOccurred on calculation error', async () => {
200200
const resultCallback = mock();
201201
const errorCallback = mock();
202202

@@ -207,7 +207,7 @@ describe('AggregatesCalculator Interface', () => {
207207
errorOccurred: errorCallback
208208
});
209209
} catch (error) {
210-
// Ожидаем, что ошибка будет перехвачена
210+
// Expect the error to be caught
211211
}
212212

213213
expect(resultCallback).not.toHaveBeenCalled();
@@ -217,20 +217,20 @@ describe('AggregatesCalculator Interface', () => {
217217
expect(error.level).toBe(0);
218218
});
219219

220-
it('должен возвращать needRecalculation=true после reset', () => {
220+
it('should return needRecalculation=true after reset', () => {
221221
calculator.reset();
222222
expect(calculator.needRecalculation()).toBe(true);
223223
});
224224

225-
it('должен возвращать needRecalculation=false после успешного вычисления', async () => {
225+
it('should return needRecalculation=false after successful calculation', async () => {
226226
await calculator.calculate();
227227
expect(calculator.needRecalculation()).toBe(false);
228228
});
229229
});
230230

231-
// Тесты для структур данных
231+
// Tests for data structures
232232
describe('Data Structures', () => {
233-
it('должен правильно определять DataGroup', () => {
233+
it('should correctly define a DataGroup', () => {
234234
const group: DataGroup = {
235235
name: 'TestGroup',
236236
columns: ['col1', 'col2']
@@ -240,7 +240,7 @@ describe('Data Structures', () => {
240240
expect(group.columns).toBeArrayEqual(['col1', 'col2']);
241241
});
242242

243-
it('должен работать с GroupKey как с объектом', () => {
243+
it('should work with GroupKey as an object', () => {
244244
const key: GroupKey = {
245245
col1: 'value1',
246246
col2: 100
@@ -249,8 +249,8 @@ describe('Data Structures', () => {
249249
expect(key.col1).toBe('value1');
250250
expect(key.col2).toBe(100);
251251
});
252-
253-
it('должен работать с GroupTotals как с объектом', () => {
252+
253+
it('should work with GroupTotals as an object', () => {
254254
const totals: GroupTotals = {
255255
sum: 500,
256256
avg: 100,
@@ -262,15 +262,15 @@ describe('Data Structures', () => {
262262
expect(totals.count).toBe(5);
263263
});
264264

265-
it('должен создавать AggrCalculationError с уровнем', () => {
265+
it('should create an AggrCalculationError with a level', () => {
266266
const error = new Error('Test error') as AggrCalculationError;
267267
error.level = 2;
268268

269269
expect(error.message).toBe('Test error');
270270
expect(error.level).toBe(2);
271271
});
272272

273-
it('должен создавать AggrCalculationOptions с опциями', () => {
273+
it('should create an AggrCalculationOptions with options', () => {
274274
const options: AggrCalculationOptions = {
275275
maxLevel: 3,
276276
resultObtained: mock(),

0 commit comments

Comments
 (0)