@thejrsoft/subway-protocol 1.7.4 → 1.7.6

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.
@@ -260,8 +260,8 @@ export class MessageValidator {
260
260
 
261
261
  // 验证程序参数
262
262
  const requiredParams = [
263
- 'deviceId', 'taskId', 'programId', 'programName',
264
- 'programNumber', 'programType', 'width', 'height',
263
+ 'deviceId', 'taskId', 'programId', 'programName',
264
+ 'programNo', 'programType', 'width', 'height',
265
265
  'direction',
266
266
  'downloadUrl', 'checksum', 'hashAlgorithm'
267
267
  ];
@@ -282,11 +282,11 @@ export class MessageValidator {
282
282
  if (params.hashAlgorithm && !['SHA256', 'MD5'].includes(params.hashAlgorithm)) {
283
283
  errors.push('hashAlgorithm must be SHA256 or MD5');
284
284
  }
285
- if (params.programNumber !== undefined && params.programNumber !== null) {
286
- if (typeof params.programNumber !== 'number' || isNaN(params.programNumber)) {
287
- errors.push('programNumber must be a number');
288
- } else if (params.programNumber < 1 || params.programNumber > 10) {
289
- errors.push('programNumber must be between 1 and 10');
285
+ if (params.programNo !== undefined && params.programNo !== null) {
286
+ if (typeof params.programNo !== 'number' || isNaN(params.programNo)) {
287
+ errors.push('programNo must be a number');
288
+ } else if (params.programNo < 1 || params.programNo > 10) {
289
+ errors.push('programNo must be between 1 and 10');
290
290
  }
291
291
  }
292
292