vrack2-core 1.0.1 → 1.0.2

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
@@ -10,10 +10,9 @@ VRack2 Core
10
10
  --------
11
11
 
12
12
 
13
- ### Последнее обновление 1.0.1
13
+ ### Последнее обновление 1.0.2
14
14
 
15
- - Обновлены пакеты TypeScript
16
- - Добавлена валидация параметров класса устройства в `DeviceManager.getDeviceInfo()`
15
+ - Откат от валидации в `DeviceManager.getDeviceInfo()`
17
16
 
18
17
  **Использовать эту документацию имеет смысл только для более глубокого изучения устройства VRack2 или для создания сервиса независимого от VRack2**
19
18
 
@@ -42,7 +42,6 @@ const Rule_1 = __importDefault(require("../validator/Rule"));
42
42
  const CoreError_1 = __importDefault(require("../errors/CoreError"));
43
43
  const BootClass_1 = __importDefault(require("./BootClass"));
44
44
  const ImportManager_1 = __importDefault(require("../ImportManager"));
45
- const Validator_1 = __importDefault(require("../validator/Validator"));
46
45
  ErrorManager_1.default.register('DeviceManager', 'S5dBTBKTnVbF', 'DM_DEVICE_NOT_FOUND', 'Device not found', {
47
46
  device: Rule_1.default.string().require().example('Master').description('Device name')
48
47
  });
@@ -130,10 +129,6 @@ class DeviceManager extends BootClass_1.default {
130
129
  const di = [vendor, device].join('.');
131
130
  const DeviceClass = yield this.get(di);
132
131
  const dev = new DeviceClass('1', di, this);
133
- // Заполняем значения по умолчанию валидатором
134
- // Это нужно динамических портов которые определяются через options
135
- const rules = dev.checkOptions();
136
- Validator_1.default.validate(rules, dev.options);
137
132
  const result = { actions: {}, metrics: {}, inputs: {}, outputs: {}, options: {}, description: '' };
138
133
  try {
139
134
  const preOptions = dev.checkOptions();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vrack2-core",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Фреймворк для создания событийно-ориентированных сервисов на JavaScript/TypeScript",
5
5
  "main": "./lib/index",
6
6
  "scripts": {},
@@ -11,7 +11,6 @@ import IAction from '../actions/IAction'
11
11
  import IMetricSettings from '../metrics/IMetricSettings'
12
12
  import IPort from '../ports/IPort'
13
13
  import IValidationRule from '../validator/IValidationRule'
14
- import Validator from '../validator/Validator'
15
14
 
16
15
  export interface IDeviceVendor {
17
16
  /** Group name = Vendor name */
@@ -176,11 +175,6 @@ export default class DeviceManager extends BootClass {
176
175
  const DeviceClass = await this.get(di)
177
176
  const dev = new DeviceClass('1', di, this) as Device
178
177
 
179
- // Заполняем значения по умолчанию валидатором
180
- // Это нужно динамических портов которые определяются через options
181
- const rules = dev.checkOptions()
182
- Validator.validate(rules, dev.options)
183
-
184
178
  const result: IDeivceInfo = { actions: {}, metrics: {}, inputs: {}, outputs: {}, options: {}, description: '' }
185
179
  try {
186
180
  const preOptions = dev.checkOptions();